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 A162164 #6 Feb 24 2019 21:09:17 %S A162164 179,233,467,521,739,809,1097,1171,1601,1619,1801,1873,1907,2467,3203, %T A162164 3329,3331,3491,3923,4051,4177,4211,4931,5507,5651,6067,6121,6353, %U A162164 6569,6659,7219,8081,8243,8297,8353,8819,9091,9161,9377,10243,10531,10657 %N A162164 Primes p such that p-1 and p+1 can be written as a sum of 2 distinct nonzero squares. %F A162164 {p=A000040(i): p-1 in A004431 and p+1 in A004431}. - _R. J. Mathar_, Jul 02 2009 %e A162164 p=179 is a term because 179 - 1 = 3^2 + 13^2 and 179 + 1 = 6^2 + 12^2. %p A162164 isA004431 := proc(n) local x,y ; for x from 1 do if x^2 > n then RETURN(false); fi; y := n-x^2 ; if y> 0 and issqr(y ) then y := sqrt(y) ; if y <> x then RETURN(true) ; fi; fi; od: end: %p A162164 for n from 1 to 2000 do p := ithprime(n) ; if isA004431(p-1) and isA004431(p+1) then printf("%d,",p) ; fi; od: # _R. J. Mathar_, Jul 02 2009 %t A162164 f[n_]:=Module[{k=1},While[(n-k^2)^(1/2)!=IntegerPart[(n-k^2)^(1/2)],k++; If[2*k^2>=n,k=0;Break[]]];k]; lst={};Do[p=Prime[n];If[f[p-1]>0&&f[p+1]> 0,AppendTo[lst,p]],{n,4*6!}];lst %K A162164 nonn %O A162164 1,1 %A A162164 _Vladimir Joseph Stephan Orlovsky_, Jun 26 2009 %E A162164 Definition corrected, _R. J. Mathar_, Jul 02 2009