程序代码:
from sympy import primerange,isprime
primes=list(primerange(3,10000))
for a in range(-99,100,2):
max=30
for p in primes:
k=0
while isprime(k*(k+a)+p):
k+=1
if k>=max:
print(''.join(['x^2+',str(a),'x+',str(p),',k=0~',str(k)]).replace('+-','-'))
x^2-79x+1601,k=0~80
x^2-77x+1523,k=0~79
x^2-75x+1447,k=0~78
x^2-73x+1373,k=0~77
x^2-71x+1301,k=0~76
x^2-69x+1231,k=0~75
x^2-67x+1163,k=0~74
x^2-65x+1097,k=0~73
x^2-63x+1033,k=0~72
x^2-61x+971,k=0~71
x^2-59x+911,k=0~70
x^2-57x+853,k=0~69
x^2-55x+797,k=0~68
x^2-53x+743,k=0~67
x^2-51x+691,k=0~66
x^2-49x+641,k=0~65
x^2-47x+593,k=0~64
x^2-45x+547,k=0~63
x^2-43x+503,k=0~62
x^2-41x+461,k=0~61
x^2-39x+421,k=0~60
x^2-37x+383,k=0~59
x^2-35x+347,k=0~58
x^2-33x+313,k=0~57
x^2-31x+257,k=0~32
x^2-31x+281,k=0~56
x^2-29x+227,k=0~31
x^2-29x+251,k=0~55
x^2-27x+199,k=0~30
x^2-27x+223,k=0~54
x^2-25x+197,k=0~53
x^2-23x+173,k=0~52
x^2-21x+151,k=0~51
x^2-19x+131,k=0~50
x^2-17x+113,k=0~49
x^2-15x+97,k=0~48
x^2-13x+83,k=0~47
x^2-11x+71,k=0~46
x^2-9x+61,k=0~45
x^2-7x+53,k=0~44
x^2-5x+47,k=0~43
x^2-3x+43,k=0~42
x^2-1x+41,k=0~41
x^2+1x+41,k=0~40
x^2+3x+43,k=0~39
x^2+5x+47,k=0~38
x^2+7x+53,k=0~37
x^2+9x+61,k=0~36
x^2+11x+71,k=0~35
x^2+13x+83,k=0~34
x^2+15x+97,k=0~33
x^2+17x+113,k=0~32
x^2+19x+131,k=0~31
x^2+21x+151,k=0~30
这是在vb6版块有人给的答案。