OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,5,0,-4).
FORMULA
G.f.: x*(1+4*x)/((1-x^2)*(1-4x^2)). - Ralf Stephan, Sep 16 2003
a(n) = 2^n+(-2)^n/3-(-1)^n/2-5/6. - Paul Barry, Apr 22 2004
a(n) = a(n-1)*4 if n even; a(n) = a(n-1)+1 if n odd. - Philippe Deléham, Apr 22 2013
MATHEMATICA
CoefficientList[Series[x (1 + 4 x) / ((1 - x^2) (1 - 4 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 05 2013 *)
LinearRecurrence[{0, 5, 0, -4}, {0, 1, 4, 5}, 40] (* Harvey P. Dale, Nov 11 2021 *)
PROG
(Magma) [2^n+(-2)^n/3-(-1)^n/2-5/6: n in [0..30]]; // Vincenzo Librandi, Aug 05 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Feb 26 2003
STATUS
approved