login
A071689
Number of ways to write n as n = x*y*z*t+x+y+z+t 0<=x<=y<=z<=t<=n.
2
1, 1, 2, 3, 4, 6, 7, 9, 10, 13, 15, 17, 19, 23, 24, 29, 31, 35, 37, 42, 45, 50, 53, 57, 62, 69, 71, 77, 81, 87, 92, 99, 102, 111, 116, 122, 128, 138, 140, 148, 156, 165, 170, 180, 184, 195, 203, 210, 218, 229, 236, 246, 254, 263, 271, 285, 291, 304, 311, 322
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
Sequence in context: A190859 A088572 A366972 * A187092 A076679 A339509
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 23 2002
STATUS
approved