OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,1,-9,5,3,-2).
FORMULA
G.f.: x^3*(4 - 5*x - 2*x^2 + 2*x^3)/((1-x)*(1-2*x)*(1+x-x^2)*(1-x-x^2)).
From G. C. Greubel, Sep 28 2019: (Start)
a(n) = (2^(n+1) - 2 - Fibonacci(n+3) - (-1)^n*Fibonacci(n))/2, n > 0.
a(2*n) = 4^n - 1 - Fibonacci(2*n+2), n > 0.
a(2*n+1) = 2^(2*n+1) - 1 - Fibonacci(2*n+2). (End)
MAPLE
with(combinat); seq(`if`(n=0, 0, (2^(n+1)-2-fibonacci(n+3) -(-1)^n* fibonacci(n))/2), n=0..40); # G. C. Greubel, Sep 28 2019
MATHEMATICA
Table[If[n==0, 0, (2^(n+1) -2 -Fibonacci[n+3] -(-1)^n*Fibonacci[n])/2], {n, 0, 40}] (* G. C. Greubel, Sep 28 2019 *)
PROG
(PARI) concat([0], vector(40, n, (2^(n+1)-2-fibonacci(n+3) -(-1)^n* fibonacci(n))/2)) \\ G. C. Greubel, Sep 28 2019
(Magma) [0] cat [(2^(n+1)-2-Fibonacci(n+3) -(-1)^n*Fibonacci(n))/2: n in [1..40]]; // G. C. Greubel, Sep 28 2019
(Sage) [0]+[(2^(n+1)-2-fibonacci(n+3) -(-1)^n*fibonacci(n))/2 for n in (1..40)] # G. C. Greubel, Sep 28 2019
(GAP) Concatenation([0], List([1..40], n-> (2^(n+1)-2-Fibonacci(n+3) -(-1)^n*Fibonacci(n))/2)); # G. C. Greubel, Sep 28 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved