login
Primes p of the form prime(n+1)^2-prime(n)^2+1.
1

%I #12 May 21 2021 16:20:32

%S 17,73,73,313,409,313,601,673,241,769,1033,1489,409,433,3361,1033,

%T 1609,601,1321,2113,769,5209,1801,2833,3049,3121,1129,2473,1249,2521,

%U 6841,4273,4441,4513,3049,6481,8521,5233,3529,3673,11353,6073,2089,6529,6793,2281,7321

%N Primes p of the form prime(n+1)^2-prime(n)^2+1.

%H K. D. Bajpai, <a href="/A229496/b229496.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1)=17: prime(2+1)^2-prime(2)^2+1= 17, which is prime.

%e a(6)=313: prime(12+1)^2-prime(12)^2+1= 313, which is prime.

%p KD:= proc() local a,b,c,d; a:=ithprime(n+1)^2-ithprime(n)^2+1;if isprime(a) then RETURN(a): fi;end:seq(KD(),n=1..500);

%t Select[Table[Prime[n + 1]^2 - Prime[n]^2 + 1, {n, 10^3}], PrimeQ[#] &]

%t Select[#[[2]]-#[[1]]+1&/@Partition[Prime[Range[200]]^2,2,1],PrimeQ] (* _Harvey P. Dale_, May 21 2021 *)

%o (PARI) for(n=1,10^3,if(ispseudoprime(k=prime(n+1)^2-prime(n)^2+1),print1(k", ")))

%Y Cf. A176136, A069482.

%K nonn

%O 1,1

%A _K. D. Bajpai_, Sep 25 2013