OFFSET
1,1
EXAMPLE
a(4) = 17 because the four consecutive primes 17, 19, 23, 29 have 17^2 + 19^2, 19^2 + 23^2, 23^2 + 29^2 are all divisible by 10, and this is maximal because 13^2 + 17^2 and 29^2 + 31^2 are not divisible by 10.
MAPLE
P:= select(isprime, [2, seq(i, i=3..10^7, 2)]):
N:= nops(P):
R:= select(t -> P[t]^2 + P[t+1]^2 mod 10 = 0, [$1..N-1]):
nR:=nops(R):
V:= Vector(100): V[1]:= 2:
state:= 1: p:= P[R[1]];
for i from 2 to nR do
if R[i] = R[i-1]+1 then state:= state+1
else if V[state+1] = 0 then V[state+1]:= p fi;
state:= 1;
p:= P[R[i]];
fi
od:
V:= convert(V, list):
member(0, V, 'm'):
V[1..m-1];
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 22 2021
EXTENSIONS
a(22)-a(33) from Martin Ehrenstein, Sep 01 2021
STATUS
approved