Skip to content

Instantly share code, notes, and snippets.

@nickponline
Last active January 21, 2022 18:28
Show Gist options
  • Save nickponline/9a3fb1ee5333c52ed195625ea17c15b2 to your computer and use it in GitHub Desktop.
Save nickponline/9a3fb1ee5333c52ed195625ea17c15b2 to your computer and use it in GitHub Desktop.
Solver for Primel (https://converged.yt/primel/)
# A Primel Solver
# Sieve of Eratosthenes
N = 100000
primes = [True] * N
for i in range(2, N):
if not primes[i]:
continue
k = i + i
while k < N:
primes[k] = False
k += i
useful = [ str(i) if primes[i] and len(str(i)) == 5 ]
# Plugin in your clues
for i in useful:
if i[0] == '6' and i[4] == '9' and ('3' in i) and ('5' in i) and ('8' in i):
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment