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}.
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
Links
- Index entries for linear recurrences with constant coefficients, signature (-2, 0, 5, 7, 0, -9, -9, 0, 7, 5, 0, -2, -1).
Crossrefs
Cf. A211795.
Programs
-
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]
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 ).
Comments