A097924 a(n) = 4*a(n-1) + a(n-2), n>=2, a(0) = 2, a(1) = 7.
2, 7, 30, 127, 538, 2279, 9654, 40895, 173234, 733831, 3108558, 13168063, 55780810, 236291303, 1000946022, 4240075391, 17961247586, 76085065735, 322301510526, 1365291107839, 5783465941882, 24499154875367, 103780085443350, 439619496648767, 1862258072038418
Offset: 0
Examples
G.f. = 2 + 7*x + 30*x^2 + 127*x^3 + 538*x^4 + 2279*x^5 + 9654*x^6 + 40895*x^7 + ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Mark W. Coffey, James L. Hindmarsh, Matthew C. Lettington, and John Pryce, On Higher Dimensional Interlacing Fibonacci Sequences, Continued Fractions and Chebyshev Polynomials, arXiv:1502.03085 [math.NT], 2015 (see p. 31).
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (4,1).
Programs
-
Magma
I:=[2,7]; [n le 2 select I[n] else 4*Self(n-1) + Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 20 2017
-
Mathematica
a[n_] := Expand[((2Sqrt[5] + 3)*(2 + Sqrt[5])^n + (2Sqrt[5] - 3)*(2 - Sqrt[5])^n)/(2Sqrt[5])]; Table[ a[n], {n, 0, 20}] (* Robert G. Wilson v, Sep 17 2004 *) a[ n_] := (3 I ChebyshevT[ n + 1, -2 I] + 4 ChebyshevT[ n, -2 I]) I^n / 5; (* Michael Somos, Feb 23 2014 *) a[ n_] := If[ n < 0, SeriesCoefficient[ (2 + 7 x) / (1 + 4 x - x^2), {x, 0, -n}], SeriesCoefficient[ (2 - x) / (1 - 4 x - x^2), {x, 0, n}]]; (* Michael Somos, Feb 23 2014 *) LinearRecurrence[{4,1}, {2,7}, 50] (* G. C. Greubel, Dec 20 2017 *)
-
PARI
{a(n) = ( 3*I*polchebyshev( n+1, 1, -2*I) + 4*polchebyshev( n, 1, -2*I)) * I^n / 5}; \\ Michael Somos, Feb 23 2014
-
PARI
{a(n) = if( n<0, polcoeff( (2 + 7*x) / (1 + 4*x - x^2) + x * O(x^-n), -n), polcoeff( (2 - x) / (1 - 4*x - x^2) + x * O(x^n), n))}; \\ Michael Somos, Feb 23 2014
Formula
a(n) = ((2*sqrt(5)+3)*(2+sqrt(5))^n + (2*sqrt(5)-3)*(2-sqrt(5))^n)/(2*sqrt(5)).
From Philippe Deléham, Nov 20 2008: (Start)
a(n) = 4*a(n-1) + a(n-2) for n>=2, a(0)=2, a(1)=7.
G.f.: (2-x)/(1-4*x-x^2). (End)
G.f.: G(0)*(2-x)/2, where G(k) = 1 + 1/(1 - x*(8*k + 4 +x)/(x*(8*k + 8 +x) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 15 2014
a(-1 - n) = -(-1)^n * A048875(n). - Michael Somos, Feb 23 2014
E.g.f.: exp(2*x)*(10*cosh(sqrt(5)*x) + 3*sqrt(5)*sinh(sqrt(5)*x))/5. - Stefano Spezia, Aug 21 2025
Extensions
Edited, corrected and extended by Robert G. Wilson v, Sep 17 2004
Better name (using formula from Philippe Deléham) from Joerg Arndt, Feb 16 2014
Comments