OFFSET
1,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,4,0,-1).
FORMULA
G.f.: x*(1 + x)*(1 - 3*x^2)/(1 - 4*x^2 + x^4).
a(n) = 3*b(n) + b(n-1) - 11*b(n-2) - 3*b(n-3), where a(0) = a(1) = 1, b(n) = (1/2)*(1 + (-1)^n)*c((n+2)/2), and c(n) = ((2+sqrt(3))^n - (2-sqrt(3))^n)/(2*sqrt(3)) (A001353). - G. C. Greubel, Jul 10 2021
PROG
(Magma) [n le 4 select 1 else 4*Self(n-2) - Self(n-4): n in [1..41]]; // G. C. Greubel, Jul 10 2021
(Sage)
def a(n): return 1 if (n<5) else 4*a(n-2) - a(n-4)
[a(n) for n in (1..40)] # G. C. Greubel, Jul 10 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 17 2006
EXTENSIONS
Edited by G. C. Greubel, Jul 10 2021
STATUS
approved