OFFSET
1,2
COMMENTS
a(n) <= A000292(n); a(n) = number of terms in n-th row of the triangle in A200741. - Reinhard Zumkeller, Nov 21 2011
LINKS
David A. Corneth, Table of n, a(n) for n = 1..3000
MAPLE
f:=proc(n) local i, j, k, t1; t1:={}; for i from 1 to n do for j from i to n do for k from j to n do t1:={op(t1), i*j+j*k+k*i}; od: od: od: t1:=convert(t1, list); nops(t1); end;
MATHEMATICA
f[n_] := Length[ Union[ Flatten[ Table[i*j + j*k + k*i, {i, n}, {j, i, n}, {k, j, n}] ]]]; Table[ f[n], {n, 48}] (* Robert G. Wilson v, Dec 14 2004 *)
PROG
(Haskell)
a100440 = length . a200741_row -- Reinhard Zumkeller, Nov 21 2011
(PARI) first(n) = {my(v = vector(3*n^2, i, oo), res = vector(n)); forvec(x = vector(3, i, [1, n]), c = x[1]*x[2] + x[1]*x[3] + x[2]*x[3]; v[c] = min(x[3], v[c]); , 1); for(i = 1, #v, if(v[i] < oo, res[v[i]]++)); for(i = 2, #res, res[i] += res[i-1]); res } \\ David A. Corneth, Mar 23 2021
(Python)
from numba import njit
@njit()
def aupton(terms):
aset, alst = set(), []
for n in range(1, terms+1):
for i in range(1, n+1):
for j in range(i, n+1):
aset.add(i*j + j*n + n*i)
alst.append(len(aset))
return alst
print(aupton(50)) # Michael S. Branicky, Mar 23 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 21 2004
EXTENSIONS
More terms from Robert G. Wilson v, Dec 14 2004
STATUS
approved