summaryrefslogtreecommitdiffstats
path: root/tools/primes.py
blob: c4be13baaec44f1b164c54af3d28c0726e0edc2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
primes = [2, 3, 5, 7]
safe = True

muliplier = 1
for p in primes:
    muliplier *= p

offsets = []
for x in range(3, muliplier + 3, 2):
    prime = True
    for p in primes:
        if not x % p or (safe and not ((x - 1) / 2) % p):
            prime = False
            break

    if prime:
        offsets.append(x)

print(offsets)
print(len(offsets))
print(muliplier)