cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A054485 Expansion of (1+3*x)/(1-4*x+x^2).

Original entry on oeis.org

1, 7, 27, 101, 377, 1407, 5251, 19597, 73137, 272951, 1018667, 3801717, 14188201, 52951087, 197616147, 737513501, 2752437857, 10272237927, 38336513851, 143073817477, 533958756057, 1992761206751, 7437086070947, 27755583077037
Offset: 0

Views

Author

Barry E. Williams, May 06 2000

Keywords

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 122-125, 194-196.

Crossrefs

Cf. A054491.

Programs

  • GAP
    a:=[1,7];; for n in [3..30] do a[n]:=4*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Jan 19 2020
  • Magma
    I:=[1, 7]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in[1..30]]; // Vincenzo Librandi, Jun 23 2012
    
  • Maple
    seq( simplify(ChebyshevU(n,2) +3*ChebyshevU(n-1,2)), n=0..30); # G. C. Greubel, Jan 19 2020
  • Mathematica
    LinearRecurrence[{4,-1},{1,7},40] (* Vincenzo Librandi, Jun 23 2012 *)
    Table[ChebyshevU[n, 2] +3*ChebyshevU[n-1, 2], {n,0,30}] (* G. C. Greubel, Jan 19 2020 *)
  • PARI
    Vec((1+3*x)/(1-4*x+x^2) + O(x^30)) \\ Michel Marcus, Mar 20 2015
    
  • PARI
    vector(31, n, polchebyshev(n-1,1,2) +5*polchebyshev(n-2,2,2) ) \\ G. C. Greubel, Jan 19 2020
    
  • Sage
    [chebyshev_U(n,2) + 3*chebyshev_U(n-1,2) for n in (0..30)] # G. C. Greubel, Jan 19 2020
    

Formula

a(n) = (7*((2+sqrt(3))^n - (2-sqrt(3))^n) - ((2+sqrt(3))^(n-1) - (2-sqrt(3))^(n-1)))/2*sqrt(3).
a(n) = 4*a(n-1) - a(n-2), a(0)=1, a(0)=7.
a(n) = ChebyshevU(n,2) + 3*Chebyshev(n-1,2) = ChebyshevT(n,2) + 5*ChebyshevU(n-1,2). - G. C. Greubel, Jan 19 2020