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 A120090 #17 May 24 2024 08:42:41 %S A120090 12,30,56,90,132,154,182,208,234,240,306,340,374,380,408,418,456,462, %T A120090 494,546,552,598,644,650,690,700,736,756,800,850,864,870,918,928,986, %U A120090 992,1026,1044,1054,1102,1116,1122,1160,1178,1240,1254,1260,1302,1320 %N A120090 Numbers whose square is the perimeter of a primitive Pythagorean triangle. %C A120090 a(n) = sqrt(A120089). %H A120090 Charlie Neder, <a href="/A120090/b120090.txt">Table of n, a(n) for n = 1..1000</a> %H A120090 P. Yiu, <a href="http://math.fau.edu/yiu/RecreationalMathematics2003.pdf">"Primitive Pythagorean triangles with square perimeters" in 'Recreational Mathematics' Chap. 6.2 pp. 50/360</a> %F A120090 a(n) = 2*u*v, where u=sqrt(j/2) and v=sqrt(j+k) {for coprime pairs(j,k) j>k with odd k such that pairs (u,v) are coprime with v odd}. %p A120090 isA024364 := proc(an) local r::integer,s::integer ; for r from floor((an/4)^(1/2)) to floor((an/2)^(1/2)) do for s from r-1 to 1 by -2 do if 2*r*(r+s) = an and gcd(r,s) < 2 then RETURN(true) ; fi ; if 2*r*(r+s) < an then break ; fi ; od ; od : RETURN(false) ; end : for n from 2 to 1200 do if isA024364(n^2) then printf("%d,",n) ; fi ; od ; # _R. J. Mathar_, Jun 08 2006 %t A120090 isA024364[an_] := Module[{r, s}, For[ r = Floor[(an/4)^(1/2)], r <= Floor[(an/2)^(1/2)], r++, For[s = r - 1, s >= 1, s -= 2, If[2 r (r + s) == an && GCD[r, s] < 2, Return[True]]; If[2 r (r + s) < an, Break[]]]]; Return[False]]; %t A120090 Select[Range[2, 2000], If[isA024364[#^2], Print[#]; True, False]&] (* _Jean-François Alcover_, May 24 2024, after _R. J. Mathar_ *) %K A120090 nonn %O A120090 1,1 %A A120090 _Lekraj Beedassy_, Jun 07 2006 %E A120090 Corrected and extended by _R. J. Mathar_, Jun 08 2006