OFFSET
1,2
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
a[1] := 1:for i from 1 to 200 do s := 0:for j from 1 to i do if((i*(i+1)/2 mod j*(j+1)/2)=0) then s := s+1:fi:od:a[i] := s:od:seq(a[l], l=1..200);
MATHEMATICA
nn = 100; tri = Table[n*(n+1)/2, {n, nn}]; Table[Count[Mod[tri[[n]], Take[tri, n]], 0], {n, nn}] (* T. D. Noe, Apr 12 2011 *)
PROG
(Python)
def aupton(nn):
tri = [i*(i+1)//2 for i in range(1, nn+1)]
return [sum(t%t2 == 0 for t2 in tri[:j+1]) for j, t in enumerate(tri)]
print(aupton(102)) # Michael S. Branicky, Dec 10 2021
(PARI) a(n) = sumdiv(n*(n+1)/2, d, ispolygonal(d, 3)); \\ Michel Marcus, Mar 21 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 25 2002
EXTENSIONS
More terms from Lior Manor Nov 06 2002
More terms from Sascha Kurz, Jan 26 2003
STATUS
approved