A213784 Numbers k such that both k and k^2 are sums of a twin prime pair.
12, 84, 204, 456, 1140, 5424, 10044, 11004, 13656, 17940, 27804, 36576, 43296, 62784, 72024, 87576, 87780, 94116, 99336, 107184, 120204, 131460, 161496, 165516, 168636, 179640, 187116, 190464, 197820, 213324, 219696, 235080, 235620, 244404, 251796, 263556
Offset: 1
Examples
12 = 5 + 7, 12^2 = 144 = 71 + 73.
Links
- Zak Seidov and Harvey P. Dale, Table of n, a(n) for n = 1..1000 (first 430 terms from Zak Seidov)
Crossrefs
Subsequence of A213739.
Programs
-
Mathematica
Reap[ Do[ If[ And @@ PrimeQ /@ {n/2-1, n/2+1, n^2/2-1, n^2/2+1}, Sow[n]], {n, 12, 263556, 12}]][[2, 1]] (* Jean-François Alcover, Jul 17 2012 *) tppQ[n_]:=And@@PrimeQ[n/2+{1,-1}]&&And@@PrimeQ[n^2/2+{1,-1}]; Select[ Range[ 12,300000,12],tppQ] (* Harvey P. Dale, Dec 20 2012 *) Select[12*Range[22000],AllTrue[Flatten[{#/2+{1,-1},#^2/2+{1,-1}}],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 07 2015 *)
-
PARI
is(n)=if(n%12, return(0)); isprime(n/2-1) && isprime(n/2+1) && isprime(n^2/2-1) && isprime(n^2/2+1) \\ Charles R Greathouse IV, Jul 31 2016
Comments