OFFSET
0,5
COMMENTS
For a guide to related sequences, see A211795.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,2,-4,2,-1,2,-1).
FORMULA
a(n) = 2 a(n-1)-a(n-2)+2*a(n-3)-4*a(n-4)+2*a(n-5)-a(n-6)+2*a(n-7)-a(n-8).
G.f.: x^3*(1+x+4*x^2-x^3+x^4) / ((1-x)^4*(1+x+x^2)^2). - Colin Barker, Dec 05 2015
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w + x == 3 y + 3 z, s = s + 1],
{w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
Map[t[#] &, Range[0, 50]] (* A212566 *)
PROG
(PARI) concat(vector(3), Vec(x^3*(1+x+4*x^2-x^3+x^4)/((1-x)^4*(1+x+x^2)^2) + O(x^100))) \\ Colin Barker, Dec 05 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 21 2012
STATUS
approved