OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
FORMULA
G.f.: (1+2*x-x^2-x^3)/((1-2*x-x^2)*(1+2*x-x^2)).
a(n) = (1/4)*( 3*P(n+1) + 2*P(n) + (-1)^n*P(n-1) ), where P(n) = A000129(n). - G. C. Greubel, Jul 23 2023
MATHEMATICA
LinearRecurrence[{0, 6, 0, -1}, {1, 2, 5, 11}, 40] (* G. C. Greubel, Jul 23 2023 *)
PROG
(Magma) I:= [1, 2, 5, 11]; [n le 4 select I[n] else 6*Self(n-2) -Self(n-4): n in [1..40]]; // G. C. Greubel, Jul 23 2023
(SageMath)
A000129=BinaryRecurrenceSequence(2, 1, 0, 1)
[A117719(n) for n in range(41)] # G. C. Greubel, Jul 23 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Creighton Dement, Apr 13 2006
STATUS
approved