OFFSET
0,2
COMMENTS
Partial sums of A097131.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-1,1).
FORMULA
G.f.: (1 + x - x^2 - 2*x^3)/((1 - 3*x^2 + x^4)*(1-x));
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - a(n-4) + a(n-5);
a(n) = 1 + (1/2 - sqrt(5)/2)^n*(1/2 - 3*sqrt(5)/10) - (sqrt(5)/2 - 1/2)^n*(3*sqrt(5)/10 + 1/2) + (-sqrt(5)/2 - 1/2)^n*(3*sqrt(5)/10 - 1/2) + (sqrt(5)/2 + 1/2)^n*(3*sqrt(5)/10 + 1/2);
a(2n) = 1 + 3*Fibonacci(2n) = A097136(n);
a(2n+1) = 1 + Fibonacci(2n) + Fibonacci(2n+2) = 1 + Lucas(2n).
MATHEMATICA
LinearRecurrence[{1, 3, -3, -1, 1}, {1, 2, 4, 5, 10}, 40] (* Harvey P. Dale, Nov 12 2022 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 26 2004
STATUS
approved