OFFSET
1,3
EXAMPLE
Let te(m)=(m+1)(m+2)(m+3)/6. Then te(1)=4, te(2)=10, te(3)=20, te(4)=35, te(5)=56 and te(6)=84. te(6) is the first tetrahedral number divisible by 3, hence a(3)=6.
PROG
(PARI) te(n)=(n+1)*(n+2)*(n+3)/6 for (n=1, 50, c=1; while (te(c)%n!=0, c++); print1(c", "))
(PARI) first(n) = {my(res = vector(n), todo = n); res[1] = 1; todo--; for(i = 1, oo, t = binomial(i + 2, 3); d = divisors(t); for(j = 1, #d, if(d[j] <= n && res[d[j]] == 0, res[d[j]] = i - 1; todo--; if(todo <= 0, return(res); ) ) ) ) } \\ David A. Corneth, Mar 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Jul 22 2003
EXTENSIONS
More terms from David Wasserman, Feb 10 2005
Definition corrected by David A. Corneth, Mar 22 2021
STATUS
approved