OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,7,-4,-4).
FORMULA
G.f.: x*(1+3*x)*(1+6*x+16*x^2)/((1-x)*(1+2*x)*(1-3*x-2*x^2)). - Colin Barker, Apr 04 2012
a(n) = 12*[n=0] - 23/3 + (-2)^n/6 - (9/2)*(A007482(n) - 5*A007482(n- 1)). - G. C. Greubel, Jul 20 2023
MATHEMATICA
CoefficientList[Series[(1+3x)*(1 +6x +16x^2)/((1-x)*(1+2x)*(1-3x-2x^2)), {x, 0, 50}], x] (* Bruno Berselli, Apr 04 2012 *)
LinearRecurrence[{2, 7, -4, -4}, {1, 11, 63, 247}, 40] (* G. C. Greubel, Jul 20 2023 *)
PROG
(Magma) I:=[1, 11, 63, 247]; [n le 4 select I[n] else 2*Self(n-1) + 7*Self(n-2) -4*Self(n-3) -4*Self(n-4): n in [1..40]]; // G. C. Greubel, Jul 20 2023
(SageMath)
A007482=BinaryRecurrenceSequence(3, 2, 1, 3)
[A120723(n) for n in range(41)] # G. C. Greubel, Jul 20 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Aug 17 2006
EXTENSIONS
Edited by N. J. A. Sloane, Jun 15 2007
Meaningful name from Joerg Arndt, Dec 26 2022
STATUS
approved