login
A212756
Number of (w,x,y,z) with all terms in {0,...,n} and 2w-x=max{w,x,y,z}-min{w,x,y,z}.
2
1, 4, 17, 32, 71, 104, 187, 247, 380, 484, 685, 823, 1122, 1311, 1690, 1963, 2452, 2767, 3416, 3806, 4557, 5079, 5982, 6546, 7679, 8342, 9591, 10442, 11885, 12770, 14521, 15529, 17402, 18662, 20771, 22049, 24552, 25977, 28600, 30349
OFFSET
0,2
COMMENTS
For a guide to related sequences, see A211795.
LINKS
FORMULA
a(n)=-2*a(n-1)+5*a(n-3)+7*a(n-4)-9*a(n-6)-9*a(n-7)+7*a(n-9)+5*a(n-10)-2*a(n-12)-a(n-13).
G.f.: ( 1+6*x+25*x^2+61*x^3+108*x^4+133*x^5+125*x^6+87*x^7+46*x^8+15*x^9+3*x^10 ) / ( (1+x)^3*(1+x+x^2)^3*(x-1)^4 ).
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[2 w == x + 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]] (* A212756 *)
LinearRecurrence[{-2, 0, 5, 7, 0, -9, -9, 0, 7, 5, 0, -2, -1}, {1, 4, 17, 32, 71, 104, 187, 247, 380, 484, 685, 823, 1122}, 45]
CROSSREFS
Cf. A211795.
Sequence in context: A127547 A302410 A303177 * A031040 A273675 A063115
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 28 2012
STATUS
approved