A173415 Numbers n such that both the difference and the sum of (n-th prime+1)^2 and (n-th prime)^2 are prime.
1, 3, 10, 128, 201, 223, 246, 309, 357, 393, 424, 482, 526, 815, 887, 909, 1014, 1196, 1543, 1610, 1653, 1674, 1743, 2219, 2302, 2339, 2371, 2475, 2513, 2611, 2948, 3107, 3273, 3419, 3434, 3516, 3555, 3593, 4070, 4203, 4288, 4332, 4389, 4428, 4724, 4793
Offset: 1
Keywords
Examples
a(1)=1 because (1st prime+1)^2 - (1st prime)^2=5 is prime and (1st prime+1)^2 + (1st prime)^2=13 is prime; a(2)=3 because (3rd prime+1)^2 - (3rd prime)^2=11 is prime and (3rd prime+1)^2 + (3rd prime)^2=61 is prime; a(3)=10 because (10th prime+1)^2 - (10th prime)^2=59 is prime and (10th prime+1)^2 + (10th prime)^2=1741 is prime; a(4)=128 because (128th prime+1)^2 - (128th prime)^2=1439 is prime and (128th prime+1)^2 + (128th prime)^2=1035361 is prime.
Programs
-
Mathematica
npsQ[n_]:=Module[{np=Prime[n],a,b},a=np^2;b=(np+1)^2;And@@PrimeQ[ {a+b,b-a}]]; Select[Range[5000],npsQ] (* Harvey P. Dale, Sep 11 2011 *)
Formula
Extensions
Extended beyond a(4) by R. J. Mathar, Mar 09 2010