login
Numbers k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 2.
2

%I #21 Sep 30 2024 12:56:14

%S 1,2,3,53,678,1990,5154,5632,6412,8022,8715,11211,13182,16632,16793,

%T 17263,18755,19484,23458,25693,26960,28005,28492,29024,31055,36084,

%U 41707,44434,44642,44936,46602,48630,48631,54274,56131,58219,58879,69935,74008,76310,77836,83540,83686,88526,88877,91217

%N Numbers k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 2.

%C The first three k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 3 are 1, 2, and 48630.

%C The first two k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 4 are 1 and 546158.

%C The first k such that (prime(j)-1)^2 + 1 is prime for k <= j <= k + 5 is 2296966.

%H Robert Israel, <a href="/A376522/b376522.txt">Table of n, a(n) for n = 1..5000</a>

%e 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.

%p P:= select(isprime, [2, seq(i, i=3..10^6, 2)]):

%p 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])];

%Y Cf. A000040, A127435, A173446, A376605.

%K nonn

%O 1,2

%A _Robert Israel_, Sep 29 2024