login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A213784
Numbers k such that both k and k^2 are sums of a twin prime pair.
5
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,1
COMMENTS
Or, k such that k/2 +- 1 and (k^2)/2 +- 1 are primes. Hence all k's are multiples of 12.
LINKS
Zak Seidov and Harvey P. Dale, Table of n, a(n) for n = 1..1000 (first 430 terms from Zak Seidov)
EXAMPLE
12 = 5 + 7, 12^2 = 144 = 71 + 73.
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 *)
PROG
(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
CROSSREFS
Subsequence of A213739.
Sequence in context: A213347 A075476 A298977 * A085409 A303916 A111464
KEYWORD
nonn,nice
AUTHOR
Zak Seidov, Jun 19 2012
STATUS
approved