OFFSET
1,1
COMMENTS
LINKS
Michel Marcus, Table of n, a(n) for n = 1..12471 (hypotenuses <= 10000).
PROG
(PARI) tp(n) = my(k=3); while( !ispolygonal(n, k), k++); k; \\ A176774
itp(n) = my(m=tp(n)); (m-4+sqrtint((m-4)^2+8*(m-2)*n)) / (2*m-4); \\ A176775
f(v) = vecsum(apply(itp, v));
list(lim) = {my(v=List(), m2, s2, h2, h); for(middle=4, lim-1, m2=middle^2; for(small=1, middle, s2=small^2; if(issquare(h2=m2+s2, &h), if(h>lim, break); listput(v, [h, middle, small]); ); ); ); v = vecsort(Vec(v)); apply(f, v); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, May 09 2021
STATUS
approved