Commit 5f5961bc authored by Taddeus Kroes's avatar Taddeus Kroes

Small improvement to primes_until()

parent df4f5041
......@@ -35,7 +35,7 @@ def primes_until(n):
if not lst[i]:
yield i
for j in xrange(i, n, i):
for j in xrange(i + i, n, i):
lst[j] = True
i += 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment