login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213784 Numbers k such that both k and k^2 are sums of a twin prime pair. 5

%I

%S 12,84,204,456,1140,5424,10044,11004,13656,17940,27804,36576,43296,

%T 62784,72024,87576,87780,94116,99336,107184,120204,131460,161496,

%U 165516,168636,179640,187116,190464,197820,213324,219696,235080,235620,244404,251796,263556

%N Numbers k such that both k and k^2 are sums of a twin prime pair.

%C Or, k such that k/2 +- 1 and (k^2)/2 +- 1 are primes. Hence all k's are multiples of 12.

%H Zak Seidov and Harvey P. Dale, <a href="/A213784/b213784.txt">Table of n, a(n) for n = 1..1000</a> (first 430 terms from Zak Seidov)

%e 12 = 5 + 7, 12^2 = 144 = 71 + 73.

%t 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 *)

%t 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 *)

%t 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 *)

%o (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

%Y Subsequence of A213739.

%K nonn,nice

%O 1,1

%A _Zak Seidov_, Jun 19 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 13 20:57 EST 2019. Contains 329106 sequences. (Running on oeis4.)