answersLogoWhite

0

There is no formula which will always calculate a Prime number for you. However, there are schemes for finding all the primes. The oldest is called the Seive of Eratosthenes. To find all the prime numbers between 1 and 1000,, for example, you first go through the list crossing off every other number -- these will be all the even numbers. Then you go through the remaining list crossing off every third number. Next you go through the remaining list crossing off every 4th number. Next you go through the remaining list crossing off every n th number, where n starts at 5 and goes to 499. At that point, the numbers remaining on your list are all primes. For example to find the primes between 1 and 10: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10 1, 3, 5, 7, 9 1, 5, 7 These are the primes between 1 and 10.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: How do you calculate a prime number?
Write your answer...
Submit
Still have questions?
magnify glass
imp