Sieve of Eratosthenes: Difference between revisions
Content deleted Content added
Line 1,753:
just a slight transformation away from the Sieve of Sundaram, as transformed as follows: <code>O</code> is the highest value for an Index of succesive diagonal elements in Sundaram's matrix, for which H(J) also includes the off-diagonal elements in-between, such that
duplicate entries are omitted. Thus, a slightly transformed Sieve of Sundaram is what Eratosthenes' Sieve becomes upon applying all
optimisations incorporated into the
Backward-compatible on 1K ZX80s for all primes < 441 (O=10).<lang qbasic>
10 INPUT O
|