A228978 Primes p such that p and p+2, p^2+p-1 and p^2+p+1, and (p^2+p-1)^2+p^2+p-2 and (p^2+p-1)^2+p^2+p are three pairs of twin primes.
11767181, 35057849, 84428051, 91460249, 105929711, 115401719, 162790781, 197352401, 217761851, 235863209, 266250839, 284597741, 370000511, 386278019, 554761451, 576412271, 581549669, 592975109, 611599661, 625806761, 626450411, 655727771, 670280591, 680468669, 744737111, 883687349, 1085880641, 1119813311, 1139369111
Offset: 1
Keywords
Programs
-
Mathematica
tptpQ[n_]:=Module[{p2=n^2+n},AllTrue[{p2-1,p2+1,(p2-1)^2+p2-2,(p2-1)^2+ p2},PrimeQ]]; Select[Transpose[Select[Partition[ Prime[ Range[ 58*10^6]],2,1], #[[2]]-#[[1]]==2&]][[1]],tptpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 10 2014 *)
Extensions
Corrected by Harvey P. Dale, Nov 10 2014
Comments