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 (0,25,48).
FORMULA
a(n) = w(n)((1)) where w(n) = M*w(n-1), w(0) = {0, 1, 1}, and M = {{0, 1, 0}, {0, 0, 1}, {48, 25, 0}}.
From Colin Barker, Sep 23 2012: (Start)
a(n) = 25*a(n-2) + 48*a(n-3).
G.f.: x*(1+x)/((1+3*x)*(1-3*x-16*x^2)). (End)
a(n) = (4*i)^(n-1)*(4*i*ChebyshevU(n, -3*I/8) - 5*ChebyshevU(n-1, -3*I/8)) - (-3)^n. - G. C. Greubel, Jul 07 2021
MATHEMATICA
M = {{0, 1, 0}, {0, 0, 1}, {48, 25, 0}}; w[0] = {0, 1, 1};
w[n_]:= w[n]= M.w[n - 1];
Table[w[n][[1]], {n, 0, 30}]
LinearRecurrence[{0, 25, 48}, {0, 1, 1}, 30] (* Harvey P. Dale, Mar 26 2013 *)
PROG
(Magma) I:=[0, 1, 1]; [n le 3 select I[n] else 25*Self(n-2) + 48*Self(n-3): n in [1..31]]; // G. C. Greubel, Jul 07 2021
(Sage)
def a(n, q): return 0 if (n==0) else 1 if (n<3) else q^2*a(n-2, q) + 2*(q^2-1)*a(n-3, q)
[a(n, 5) for n in (0..30)] # G. C. Greubel, Jul 07 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Feb 15 2006
EXTENSIONS
New name and edited by G. C. Greubel, Jul 07 2021
STATUS
approved