What goes in the blank?
# sieve of Eratosthenes, prime i found
for j in range(i * i, n + 1, ____):
is_prime[j] = False
Answer: i
Step by i to hit every multiple. Starting at i * i is safe because smaller multiples were crossed off by smaller primes.
Play Problem Solving ▸