OFFSET
0,1
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (6,-1).
FORMULA
a(n) = 6*a(n-1) - a(n-2), a(-1)=-1, a(0)=2.
a(n) = 2*S(n, 6)+S(n-1, 6), with S(n, x) = U(n, x/2), Chebyshev polynomials of 2nd kind, A049310. S(n, 6) = A001109(n+1).
G.f.: (2+x)/(1-6*x+x^2).
a(n) = (((3-2*sqrt(2))^n*(-7+4*sqrt(2))+(3+2*sqrt(2))^n*(7+4*sqrt(2))))/(4*sqrt(2)). - Colin Barker, Oct 12 2015
a(n) = -A054488(-1-n) for all n in Z. - Michael Somos, Jul 30 2024
EXAMPLE
8*a(1)^2 + 17 = 8*13^2+17 = 1369 = 37^2 = A077239(1)^2.
G.f. = 2 + 13*x + 76*x^2 + 443*x^3 + 2582*x^4 + ... - Michael Somos, Jul 30 2024
MATHEMATICA
LinearRecurrence[{6, -1}, {2, 13}, 30] (* or *) CoefficientList[Series[ (2+x)/(1-6*x+x^2), {x, 0, 50}], x] (* G. C. Greubel, Jan 18 2018 *)
a[ n_] := 2*ChebyshevU[n, 3] + ChebyshevU[n-1, 3]; (* Michael Somos, Jul 30 2024 *)
PROG
(PARI) Vec((2+x)/(1-6*x+x^2) + O(x^30)) \\ Colin Barker, Jun 16 2015
(PARI) {a(n) = 2*polchebyshev(n, 2, 3) + polchebyshev(n-1, 2, 3)}; /* Michael Somos, Jul 30 2024 */
(PARI) {a(n) = my(w = 3 + quadgen(32)); imag(w^n + 2*w^(n+1))}; /* Michael Somos, Jul 30 2024 */
(Magma) I:=[2, 13]; [n le 2 select I[n] else 6*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Nov 08 2002
STATUS
approved