OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..5000
EXAMPLE
a(4) = 241 is a term because the next two primes are 251 and 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)]):
P[J[select(i -> J[i+2]=J[i]+2, [$1..nops(J)-2])]];
PROG
(PARI) isok(p) = my(q=nextprime(p+1), r=nextprime(q+1)); isprime((p-1)^2+1) && isprime((q-1)^2+1) && isprime((r-1)^2+1); \\ Michel Marcus, Sep 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 29 2024
STATUS
approved