OFFSET
0,4
LINKS
Colin Barker, 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-5*x^2+2*x^3+5*x^4-4*x^6) / (1-5*x^2+4*x^4).
a(2*n) = 1 - C(1, n) + C(0, n); a(2*n+1) = 2*A002450(n).
From Colin Barker, Apr 21 2017: (Start)
a(n) = (1 - (-2)^n + 5*(-1)^n + 2^n) / 6 for n>2.
a(n) = 5*a(n-2) - 4*a(n-4) for n>4.
(End)
MATHEMATICA
LinearRecurrence[{0, 5, 0, -4}, {1, 0, 0, 2, 1, 10, 1}, 50] (* Harvey P. Dale, Oct 04 2018 *)
PROG
(PARI) Vec((1 - 5*x^2 + 2*x^3 + 5*x^4 - 4*x^6) / ((1 - x)*(1 + x)*(1 - 2*x)*(1 + 2*x)) + O(x^30)) \\ Colin Barker, Apr 21 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 15 2005
STATUS
approved