The sieve of Sundaram: Difference between revisions

Content deleted Content added
Nig (talk | contribs)
m →‎{{header|AppleScript}}: Further optimised by only marking two out of every three "numbers" in each sweep. Minor cosmetic changes.
Nig (talk | contribs)
m →‎{{header|AppleScript}}: Minor comment edit.
Line 130:
if (i ≥ n2) then exit repeat -- Enough primes obtained.
set step to step + 2
-- The first of /every three/ markings in each sweep (or the third,
-- depending on where the count starts) can be omitted, since
-- it'll be covered by other sweeps or the slot overwritten.