import math, strutils const N = 1_000_000 var comp: array[2..(N - 1), bool] # True is composite, so default is prime. for n in 2..