OFFSET
0,3
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,3,-14,8).
FORMULA
G.f.: x*(1-2*x)/((1-x)^2*(1+2*x)*(1-4*x)).
a(n) = 4*4^n/27 - 4*(-2)^n/27 + n/9.
a(n) = Sum_{k=0..n} A001045(k)^2.
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, 2, 11}, 30] (* Harvey P. Dale, Jul 01 2015 *)
PROG
(Magma) [4*4^n/27-4*(-2)^n/27+n/9: n in [0..30]]; // Vincenzo Librandi, Jul 01 2011
(PARI) a(n)=(4*4^n-4*(-2)^n+3*n)/27 \\ Charles R Greathouse IV, Jul 01 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 17 2004
STATUS
approved