Question

In: Advanced Math

Suppose when searching for a large prime, our first step is to sieve by eliminating the...

Suppose when searching for a large prime, our first step is to sieve by eliminating the first n primes. How large should n be to speed up our search by a factor of 10? This requires careful thought and inventiveness before doing a computation.

How to approach this: Eliminating all odd numbers speeds up our program by a factor of 2, since we've eliminated half of the choices that are composite. If we also immediately disqualify multiples of 3, then we speed up our program by a factor of 3, since we have eliminated 2/3 of all composites. Check that that argument is correct. Now see what happens when you eliminate all of 2, 3 and 5. Again for 2,3,5,7. Now try to figure out the mathematical result and use it to solve for n.

Solutions

Expert Solution


Related Solutions

Suppose that large number number of refugees flee from a civil war and arrive in our...
Suppose that large number number of refugees flee from a civil war and arrive in our country. Also suppose they are granted permanent resident status and are permitted to seek work. Use ISLM + ASAD model to predict what will happen in the scenario above. Indicate both the short run and long run. Label all clear starting and ending outcomes.
Our sun will first become a red giant star when it leaves the Main Sequence, as...
Our sun will first become a red giant star when it leaves the Main Sequence, as it goes from core Hydrogen burning to shell Hydrogen burning. After it has exhausted all of the fusion reactions possible, perhaps some Helium fusion in there as well, it will leave a corpse called a White Dwarf, where there is a crystalline core of carbon and mixed ash products, surrounded by
Suppose we have a two-armed bandit. Our estimate of the payout rate of the first arm...
Suppose we have a two-armed bandit. Our estimate of the payout rate of the first arm is 0.7, and our estimate of the payout rate for the second arm is 0.6. That is, ρ1 = 0.7 and ρ2 = 0.6. Our 95% confidence intervals for θ1 and θ2 are (0.6, 0.8) and (0.3, 0.9), respectively. Suppose you used an -greedy strategy with = 0.5. How might you decide which arm to pull? Suppose you used an interval exploration strategy with...
Part D When solving problems involving stoichiometric coefficients, the first step is to make sure you...
Part D When solving problems involving stoichiometric coefficients, the first step is to make sure you have a balanced chemical equation. Then, you determine the limiting reagent by using the coefficients from the balanced equation. You can keep track of the amounts of all reactant and products before and after a reaction using an ICF table. Completing the ICF table will also allow you to determine the limiting reagent, and the amount of product formed assumes that the reaction runs...
What is the first step normally taken when you look through the ocular lenses? What does...
What is the first step normally taken when you look through the ocular lenses? What does it mean that the image is inverted when you look through the ocular lenses? What is the difference between the coarse adjustment knob and the fine adjustment knob? When is it appropriate to use them? What new details are you able to see on the slide when the magnification is increased to 10x that you could not see at 4x? What about 40x?
Suppose that the federal government begins to run a large budget deficit at a time when...
Suppose that the federal government begins to run a large budget deficit at a time when many productive resources are idle factories are operating far below capacity in most industries, and there are surplus of labour in almost every area of the economy. How might the existence of all these idle resources prevent even a very large increase in government borrowing from leading to an increase in interest rates? If you found part (a) hard to answer, ask yourself whether...
Suppose your first job after graduating from college is working at a large insurance company. Your...
Suppose your first job after graduating from college is working at a large insurance company. Your boss asks you to analyze the impact self-driving cars will have on revenues from car insurance policies. List four ways self-driving cars could impact the insurance industry. Justify your answers.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT