Wikipedia gives 3571 as the 500th prime.
So, find how many primes there are between
3467 and 3571 and subtract.
There are several ways to test a number n for primality.
1). Divide n by all primes less than its square root.
If no such prime divides n then n is prime.
The largest prime you have to use as divisor here is 59.
2). Use Fermat's little theorem:
If a^(n-1) is not 1 mod n, then n is composite.
Knuth, "Art of Computer Programming", vol 2
shows how you can compute a^(n-1) in about
log n steps!
Good luck on your exam!
2007-04-16 03:51:46
·
answer #1
·
answered by steiner1745 7
·
0⤊
0⤋
I can't tell you that answer, but I can tell you that prime numbers are almost always the numbers just below and above multiples of 6.
Like 5 and 7, 11 and 13, 17 and 19, etc.
Continue this for yourself and you will be see that it's true. Some numbers in those postions are not primes, but all primes - except 2 and 3 - are in those postions.
Neat trick, eh?
2007-04-15 20:48:11
·
answer #2
·
answered by acousticbob 2
·
0⤊
0⤋
Rule for primes-In order to determine whether or not a number above 500 is a prime, you may make use of this rule:
If n'+1 is exactly divisible by n+1, is a prime. The only trouble with this rule is that it involves a rather lenghty process of continued multiplication if the number with which you are dealing with is large. (Try 997.)
2007-04-15 21:20:05
·
answer #3
·
answered by shawnwest111 1
·
1⤊
0⤋
There is an algorithm called the Sieve of Erasthonese, but no known formula.
2007-04-15 20:41:25
·
answer #4
·
answered by Helmut 7
·
0⤊
0⤋
484 primes fall in that range
A formula??? Discover one and you'll be rich and famous!!
2007-04-15 20:33:23
·
answer #5
·
answered by blighmaster 3
·
0⤊
1⤋