OFFSET
1,1
COMMENTS
LINKS
Michel Marcus, Table of n, a(n) for n = 1..12471 (hypotenuses <= 10000).
EXAMPLE
a(1) = 12 because (3, 4, 5) are (3-, 4-, 5-) gonal numbers, and 3+4+5=12.
PROG
(PARI) tp(n) = my(k=3); while( !ispolygonal(n, k), k++); k; \\ A176774
f(v) = vecsum(apply(tp, 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); } \\ adapted from A009000
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 14 2021
STATUS
approved