OFFSET
1,2
COMMENTS
The first three k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 3 are 1, 2, and 48630.
The first two k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 4 are 1 and 546158.
The first k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 5 is 2296966.
LINKS
Robert Israel, Table of n, a(n) for n = 1..5000
EXAMPLE
a(4) = 53 is a term because the 53rd, 54th and 55th primes are 241, 251, 257, and (241-1)^2 + 1 = 57601, (251-1)^2 + 1 = 62501, and (257-1)^2 + 1 = 65537 are all prime.
MAPLE
P:= select(isprime, [2, seq(i, i=3..10^6, 2)]):
J:= select(i -> isprime((P[i]-1)^2+1), [$1..nops(P)]):
J[select(i -> J[i+2]=J[i]+2, [$1..nops(J)-2])];
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 29 2024
STATUS
approved