OFFSET
0,2
COMMENTS
For a guide to related sequences, see A211795.
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,0,-4,6,-4,1)
FORMULA
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-4*a(n-5)+6*a(n-6)-4*a(n-7)+a(n-8).
From Benedict W. J. Irwin, Sep 05 2016: (Start)
a(n) = (1+7*(-1)^n)/8+n+3*n^2/2+n^3+n^4/4-sin(n*Pi/2).
G.f.: 7/(8*(1+x))-x/(1+x^2)+(-1-26*x-16*x^2-6*x^3+x^4)/(8*(x-1)^5).
(End)
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[4 v == w + x + y + z, s = s + 1], {v, 0, #},
{w, 0, #}, {x, 0, #}, {y, 0, #}, {z, 0, #}] &[n]; s)]];
Map[t[#] &, Range[0, 40]] (* A212257 *)
(* Peter J. C. Moses, Apr 13 2012 *)
Table[(1+7(-1)^n)/8+n+3n^2/2+n^3+n^4/4-Sin[n Pi/2], {n, 0, 30}] (* Benedict W. J. Irwin, Sep 05 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 15 2012
STATUS
approved