A212988 Number of (w,x,y) with all terms in {0,...,n} and 4*w = x+y.
1, 1, 2, 4, 7, 9, 12, 16, 21, 25, 30, 36, 43, 49, 56, 64, 73, 81, 90, 100, 111, 121, 132, 144, 157, 169, 182, 196, 211, 225, 240, 256, 273, 289, 306, 324, 343, 361, 380, 400, 421, 441, 462, 484, 507, 529, 552, 576, 601, 625, 650, 676, 703, 729, 756, 784
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
Crossrefs
Cf. A212959.
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[4 w == x + y, s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]]; m = Map[t[#] &, Range[0, 70]] (* A212988 *)
Formula
a(n) = 2*a(n-1)-a(n-2)+a(n-4)-2*a(n-5)+a(n-6).
G.f.: f(x)/g(x), where f(x) = 1 - x + x^2 + x^3
and g(x) = (1 + x + x^2 + x^3)(1-x)^3.
Comments