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 A162152 #8 Jun 07 2020 18:23:28 %S A162152 0,2,8,12,22,30,32,44,50,62,76,84,90,96,98,122,132,140,158,162,174, %T A162152 182,212,222,240,246,254,260,274,288,292,312,326,328,348,362,372,380, %U A162152 386,392,404,422,432,482,490,510,524,536,552,562,572,578,582,612,618,630,638,650 %N A162152 Numbers of the form x(x-1) + y(y-1) with x^2 + y^2 being a prime, x,y >= 0. %C A162152 Each term is the sum of two oblong numbers and therefore even. %e A162152 a(1)=0 from x=y=1, with 2 a prime. %e A162152 a(2)=2 from x=1, y=2, with 5 a prime. %e A162152 a(3)=8 from x=2, y=3, with 13 a prime. %e A162152 a(4)=12 from x=1, y=4, with 17 a prime. %e A162152 a(4)=22 from x=2, y=5, with 29 a prime. %e A162152 a(.)=212 from x=2, y=15, with 229 a prime, or from x=8, y=13, with 233 a prime. %p A162152 obl := proc(n) n*(n-1) ; end: lim := 800; L := {} ; %p A162152 for x from 0 to lim/2 do for y from x to lim/2 do if obl(x)+obl(y) <= lim then if isprime(x^2+y^2) then L := L union { obl(x)+obl(y) } ; fi; fi; od: od: sort(L) ; # _R. J. Mathar_, Sep 11 2009 %t A162152 Take[#[[1]](#[[1]]-1)+#[[2]](#[[2]]-1)&/@Select[Tuples[ Range[ 0,40],2],PrimeQ[ Total[#^2]]&]//Union,60] (* _Harvey P. Dale_, Jun 07 2020 *) %Y A162152 Cf. A000290, A002313, A005843, A045637. %K A162152 nonn %O A162152 1,2 %A A162152 _Juri-Stepan Gerasimov_, Jun 26 2009, Jul 29 2009 %E A162152 Duplicates of 212 and 432 removed, 500 removed by _R. J. Mathar_, Sep 11 2009