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.

A165458 a(0)=1, a(1)=4, a(n) = 12*a(n-2) - a(n-1).

Original entry on oeis.org

1, 4, 8, 40, 56, 424, 248, 4840, -1864, 59944, -82312, 801640, -1789384, 11409064, -32881672, 169790440, -564370504, 2601855784, -9374301832, 40596571240, -153088193224, 640247048104, -2477305366792, 10160269944040, -39887934345544, 161811173674024
Offset: 0

Views

Author

Philippe Deléham, Sep 20 2009

Keywords

Comments

a(n)/a(n-1) tends to -4.

Programs

  • GAP
    a:=[1,4];; for n in [3..27] do a[n]:=12*a[n-2]-a[n-1]; od; a; # Muniru A Asiru, Oct 21 2018
  • Magma
    [(8*3^n-(-4)^n)/7: n in [0..40]]; // G. C. Greubel, Oct 20 2018
    
  • Maple
    A165458:=n->(8*3^n-(-4)^n)/7: seq(A165458(n), n=0..40); # Wesley Ivan Hurt, May 26 2015
  • Mathematica
    LinearRecurrence[{-1,12},{1,4},30] (* Harvey P. Dale, Dec 26 2015 *)
  • PARI
    vector(40, n, n--; (8*3^n-(-4)^n)/7) \\ G. C. Greubel, Oct 20 2018
    
  • Python
    for n in range(0, 30): print(int((8*3**n-(-4)**n)/7), end=', ') # Stefano Spezia, Oct 21 2018
    

Formula

G.f.: (1+5*x)/(1+x-12*x^2).
a(n) = Sum_{k, k=0..n} A112555(n,k)*3^k.
a(n) = (8*3^n-(-4)^n)/7. - Klaus Brockhaus, Sep 26 2009
E.g.f.: (8*exp(3*x) - exp(-4*x))/7. - G. C. Greubel, Oct 20 2018