login
A212757
Number of (w,x,y,z) with all terms in {0,...,n} and 2w=max{w,x,y,z}-min{w,x,y,z}.
2
1, 1, 13, 32, 56, 80, 177, 213, 297, 472, 580, 688, 1037, 1169, 1385, 1872, 2124, 2376, 3133, 3421, 3829, 4784, 5240, 5696, 7017, 7521, 8181, 9760, 10480, 11200, 13241, 14021, 14993, 17352, 18396, 19440, 22357, 23473, 24817, 28112, 29540
OFFSET
0,3
COMMENTS
For a guide to related sequences, see A211795.
FORMULA
a(n)=-a(n-1)+a(n-2)+4*a(n-3)+3*a(n-4)-3*a(n-5)-6*a(n-6)-3*a(n-7)+3*a(n-8)+4*a(n-9)+a(n-10)-a(n-11)-a(n-12).
G.f.: ( 1+2*x+13*x^2+40*x^3+68*x^4+52*x^5+43*x^6+38*x^7+19*x^8 ) / ( (1+x)^2*(1+x+x^2)^3*(x-1)^4 ).
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[2 w == Max[w, x, y, z] - Min[w, x, y, z], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
Map[t[#] &, Range[0, 45]] (* A212757 *)
LinearRecurrence[{-1, 1, 4, 3, -3, -6, -3, 3, 4, 1, -1, -1}, {1, 1, 13, 32, 56, 80, 177, 213, 297, 472, 580, 688}, 45]
CROSSREFS
Cf. A211795.
Sequence in context: A299449 A300087 A118513 * A140678 A282721 A206345
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 28 2012
STATUS
approved