Ловим дырку.
Код:
pdms()=
{
n= 7;
m= [113,67,443,439,31,149,191;379,101,89,281,43,317,223;211,293,97,163,449,41,179;233,389,131,109,461,73,37;359,241,13,107,173,479,61;47,263,409,311,139,181,83;91,79,251,23,137,193,659];
k= [0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0;-1, 1, 0, 0, 0, 0, 0; 0, 0,-1, 0, 0, 0, 1; 0, 0, 1, 0, 0, 0,-1; 1,-1, 0, 0, 0, 0, 0];
forstep(l=-1, 1, 2,
forstep(d=2, 1000, 2,
M= m+l*d*k; q= 0;
for(i=1, n,
for(j=1, n,
a= M[i,j];
if(a<3, break(3));
if(!isprime(a), q++);
)
);
if(q<2, print(q," ",l," ",d); print(M))
)
)
};
Попалась двойняшка.
Код:
0 -1 30
[113, 67, 443, 439, 31, 149, 191; 379, 101, 89, 281, 43, 317, 223; 211, 293, 97, 163, 449, 41, 179; 263, 359, 131, 109, 461, 73, 37; 359, 241, 43, 107, 173, 479, 31; 47, 263, 379, 311, 139, 181, 113; 61, 109, 251, 23, 137, 193, 659]