OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (4,3,-14,8).
FORMULA
G.f.: x/((1-x)^2*(1+2*x)*(1-4*x)).
a(n) = 8*4^n/27 - 2*(-2)^n/27 - (n+2)/9;
a(n) = Sum_{k=0..n} (2*4^k/3 + (-2)^k/3)*(n-k).
a(n) = 4*a(n-1) + 3*a(n-2) - 14*a(n-3) + 8*a(n-4).
MATHEMATICA
LinearRecurrence[{4, 3, -14, 8}, {0, 1, 4, 19}, 30] (* or *) Table[(2^(2n+1)-3n - 3+(-2)^n)/27, {n, 30}] (* Harvey P. Dale, Aug 08 2011 *)
PROG
(Magma) [8*4^n/27-2*(-2)^n/27-(n+2)/9: n in [0..30]]; // Vincenzo Librandi, May 31 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 17 2004
STATUS
approved