Sexy primes: Difference between revisions

m
Changed step to "2 * p" instead of "p" in sieve of Erathostenes.
m (→‎{{header|Phix}}: added syntax colouring the hard way)
m (Changed step to "2 * p" instead of "p" in sieve of Erathostenes.)
Line 1,297:
for p in countup(3, sqrt(Lim.toFloat).int, 2): # Ignore even numbers.
if not composite[p]:
for k in countup(p * p, Lim, 2 * p):
composite[k] = true
 
Anonymous user