提交 8a120852 编写于 作者: F Felix Laurie von Massenbach 提交者: Ben Laurie

Add python script to generate the bits needed for the prime generator.

上级 c09ec5d2
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)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册