OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4) for n>=9.
G.f.: (1 + 12*x + 23*x^2 + 22*x^3 + 16*x^4 + 14*x^5 - 2*x^6 + 2*x^7 + 2*x^8)/(1 - x)^4.
a(n) = 15*n^3-48*n^2+144*n-161 with n>4, a(0)=1, a(1)=16, a(2)=81, a(3)=254, a(4)=609. [Bruno Berselli, Jun 12 2012]
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[Min[Abs[w - x], Abs[x - y], Abs[y - z]] <= 2, s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
m = Map[t[#] &, Range[0, 40]] (* A212898 *)
CoefficientList[Series[(1+12*x+23*x^2+22*x^3+16*x^4+14*x^5-2*x^6+ 2*x^7+ 2*x^8)/(1-x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Jul 04 2012 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 31 2012
STATUS
approved