Joe wanted to find out the primes from 1 to 100 and has come up with the following, sieve-like algorithm:
Will this actually yield all the primes?
Here is a trial run of the first few steps of the algorithm for the purpose of demonstration.
Initially,
1 2 |
|
Remove everything at every 2 position, starting from 2:
1 2 |
|
Remove everything at every 3 position, starting from 3:
1 2 |
|
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
It suffices to prove this by showing that the algorithm misses at least a prime number.
From the trial run,