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 A178659 #18 Jan 30 2019 00:00:50 %S A178659 2,3,6,10,15,30,31,36,40,51,66,70,91,100,136,175,190,205,225,231,261, %T A178659 285,286,316,321,331,370,376,411,441,465,496,516,520,526,535,546,565, %U A178659 576,586,591,681,720,730,745,750,766,855,871,906,916,951,975,1081,1120 %N A178659 Numbers n such that n^2 +- (n-1)^2 are primes. %H A178659 G. C. Greubel, <a href="/A178659/b178659.txt">Table of n, a(n) for n = 1..10000</a> %F A178659 a(n) = 1 + A068501(n). - _Zak Seidov_, Feb 10 2015 %e A178659 2 is in the sequence because 2^2 + 1^2 = 5 and 2^2 - 1^2 = 3 are both prime. %e A178659 3 is in the sequence because 3^2 + 2^2 = 13 and 3^2 - 2^2 = 5 are both prime. %t A178659 lst={};Do[If[PrimeQ[n^2-(n-1)^2]&&PrimeQ[n^2+(n-1)^2],AppendTo[lst,n]],{n,7!}];lst %t A178659 Select[Range[8!], PrimeQ[#^2 -(#-1)^2] && PrimeQ[#^2 +(#-1)^2] &] (* _G. C. Greubel_, Jan 28 2019 *) %o A178659 (PARI) A178659()={my(maxx=1000);n=2;ptr=0; %o A178659 while(n<=maxx,q1=n^2-(n-1)^2;q2=n^2+(n-1)^2; %o A178659 if(isprime(q1)&&isprime(q2),ptr++;write("b178659.txt",ptr," ",n));n++); } \\ _Bill McEachen_, Jun 13 2014 %Y A178659 Cf. A068501. %K A178659 nonn %O A178659 1,1 %A A178659 _Vladimir Joseph Stephan Orlovsky_, Jun 01 2010