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.
%I A152787 #17 Sep 08 2022 08:45:39 %S A152787 6,12,42,72,600,642,882,2130,2382,2688,3558,3582,4548,6132,7548,8010, %T A152787 9042,13398,13932,15972,17598,19140,21492,26250,26262,34512,38670, %U A152787 39228,39342,48312,49740,52542,53088,53592,55050,55662,56100,56712,65028,65448,65520 %N A152787 Numbers k such that both k and k^2/2 are averages of twin prime pairs. %H A152787 Amiram Eldar, <a href="/A152787/b152787.txt">Table of n, a(n) for n = 1..10000</a> %F A152787 A152786 INTERSECT A014574. - _R. J. Mathar_, Jan 08 2009 %t A152787 lst={};Do[p1=Prime[n];p2=Prime[n+1];If[p2-p1==2,e=(2*(p1+1))^(1/2);i=Floor[e]; If[e==i,If[PrimeQ[i-1]&&PrimeQ[i+1],AppendTo[lst,i]]]],{n,10!}];lst %t A152787 Select[Mean/@Select[Partition[Prime[Range[10000]],2,1],#[[2]]-#[[1]] == 2&],And@@PrimeQ[#^2/2+{1,-1}]&](* _Harvey P. Dale_, May 12 2014 *) %o A152787 (Magma) [2*k:k in [1..40000]| IsPrime(2*k-1) and IsPrime(2*k+1) and IsPrime(2*k^2 -1) and IsPrime(2*k^2 +1) ]; // _Marius A. Burtea_, Dec 31 2019 %Y A152787 Cf. A014574, A152786. %K A152787 nonn %O A152787 1,1 %A A152787 _Vladimir Joseph Stephan Orlovsky_, Dec 12 2008 %E A152787 Rephrased definition by _R. J. Mathar_, Jan 08 2009 %E A152787 More terms from _Harvey P. Dale_, May 12 2014