OFFSET
0,3
LINKS
Jean-François Alcover, Table of n, a(n) for n = 0..199
MATHEMATICA
xmax = 3; ymax = 66; zmax = 99; (* When extending data, terms where maxima for x, y or z are reached have to be checked one by one. *)
r[n_] := r[n] = Module[{r1, r2, r3, rn}, r1 = Reap[Do[rn = Reduce[n == x y z t + x + y + z + t && 0 <= x <= y <= z <= t <= n, t, Integers]; If[rn =!= False, Sow[{x, y, z, t} /. {ToRules[rn]}]], {x, 0, xmax}, {y, 0, ymax}, {z, 0, zmax}]]; If[r1 == {Null, {}} , {}, r2 = r1[[2, 1]]; r3 = Flatten[r2, 1]; If[Max[r3[[All, 1]]] == xmax, Print["xmax reached at n = ", n]]; If[Max[r3[[All, 2]]] == ymax, Print["ymax reached at n = ", n]]; If[Max[r3[[All, 3]]] == zmax, Print["zmax reached at n = ", n]]; r3]];
a[n_] := Length[r[n]];
Table[Print[n, " ", a[n]]; a[n], {n, 0, m = 199}] (* Jean-François Alcover, Nov 20 2018 *)
PROG
(PARI) for(n=0, 50, print1(sum(a=0, n, sum(b=0, a, sum(c=0, b, sum(d=0, c, if(a*b*c*d+a+b+c+d-n, 0, 1))))), ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 23 2002
STATUS
approved