cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A213784 #43 Sep 16 2018 04:36:59
%S A213784 12,84,204,456,1140,5424,10044,11004,13656,17940,27804,36576,43296,
%T A213784 62784,72024,87576,87780,94116,99336,107184,120204,131460,161496,
%U A213784 165516,168636,179640,187116,190464,197820,213324,219696,235080,235620,244404,251796,263556
%N A213784 Numbers k such that both k and k^2 are sums of a twin prime pair.
%C A213784 Or, k such that k/2 +- 1 and (k^2)/2 +- 1 are primes. Hence all k's are multiples of 12.
%H A213784 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 A213784 12 = 5 + 7, 12^2 = 144 = 71 + 73.
%t A213784 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 A213784 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 A213784 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 A213784 (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 A213784 Subsequence of A213739.
%K A213784 nonn,nice
%O A213784 1,1
%A A213784 _Zak Seidov_, Jun 19 2012