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 (8,8).
FORMULA
G.f.: (1-x-x^2)/(1-8*x-8*x^2) .
a(n) = (1/8)*[n=0] - 7*(2*sqrt(2)*i)^(n-2)*ChebyshevU(n, -sqrt(2)*I). - G. C. Greubel, Mar 24 2021
MATHEMATICA
With[{m=8}, LinearRecurrence[{m, m}, {1, m-1, m^2-1}, 30]] (* G. C. Greubel, Mar 24 2021 *)
LinearRecurrence[{8, 8}, {1, 7, 63}, 20] (* Harvey P. Dale, Feb 07 2026 *)
PROG
(Magma) [1] cat [n le 2 select 7*(8*n-7) else 8*(Self(n-1) + Self(n-2)): n in [1..30]]; // G. C. Greubel, Mar 24 2021
(SageMath) [1]+[-7*(2*sqrt(2)*i)^(n-2)*chebyshev_U(n, -sqrt(2)*i) for n in (1..30)] # G. C. Greubel, Mar 24 2021
(PARI) a(n)=if(n, ([0, 1; 8, 8]^(n-1)*[7; 63])[1, 1], 1) \\ Charles R Greathouse IV, May 11 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Jan 20 2009
STATUS
approved
