Sunday, 31 March 2013

Find Prime numbers

Primes (Landau's trick)
List down systematically the primes below n < 4,000
Start with 2
2x2= 4 => take 3 (<4)
< 2x3 =6 => 5
< 2x5 =10 =>7
< 2x7 =14 => 13
...
23, 43, 83, 163, 317, 631, 1259, 2503, (4001)

No comments:

Post a Comment