OFFSET
1,2
COMMENTS
For a guide to related sequences, see A210000.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
MAPLE
g:= proc(n) local T, a, b, t, i, r;
T:= Vector(n^2):
for a from 1 to n do T[a^2]:= 1 od:
for a from 1 to n-1 do for b from a+1 to n do
T[a*b]:= T[a*b]+2
od od;
r:= n^2;
t:= T[1]*r;
for i from 2 to n^2 do
r:= r - T[i-1];
t:= t + T[i]*r;
od;
t
end proc:
g(1):= 1:
map(g, [$1..40]); # Robert Israel, Sep 06 2024
MATHEMATICA
a = 1; b = n; z1 = 35;
t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
c[n_, k_] := c[n, k] = Count[t[n], k]
c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, 0, m}]
Table[c1[n, n^2], {n, 1, z1}] (* A211058 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 31 2012
STATUS
approved