OFFSET
3,1
COMMENTS
LINKS
Michel Marcus, Table of n, a(n) for n = 3..10000
EXAMPLE
15 is the 5th triangular, the 3rd hexagonal and the 2nd 15-gonal, so a(15) = 5+3+2 = 10.
PROG
(PARI) row(n) = my(v=List()); fordiv(2*n, k, if(k<2, next); if(k==n, break); my(s=(2*n/k-4+2*k)/(k-1)); if(denominator(s)==1, listput(v, s))); Vecrev(v); \\ A177028
a(n) = my(v=row(n), s=0); for (k=1, #v, if ((v[k]>2) && ispolygonal(n, v[k], &i), s += i)); s;
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 27 2021
STATUS
approved