n = 3 * x ** 2 - y ** 2
if x > y and n <= limit and n % 12 == 11:
    sieve[n] = not sieve[n]
for x in range(5, int(math.sqrt(limit))):
    if sieve[x]:
        for y in range(x ** 2, limit + 1, x ** 2):
            sieve[y] = False
for p in range(5, limit):
    if sieve[p]:
        P.append(p)
return P
print(sieveOfAtkin(100))
Реализация решета Аткина в Python