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.

A153973 a(n) = 3*a(n-1) - 2*a(n-2), with a(1) = 9, a(2) = 12.

Original entry on oeis.org

9, 12, 18, 30, 54, 102, 198, 390, 774, 1542, 3078, 6150, 12294, 24582, 49158, 98310, 196614, 393222, 786438, 1572870, 3145734, 6291462, 12582918, 25165830, 50331654, 100663302, 201326598, 402653190, 805306374, 1610612742, 3221225478
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[9,12]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Sep 01 2016
  • Mathematica
    a=9;lst={a};Do[a=(a-2)*2-2;AppendTo[lst,a],{n,6!}];lst
    NestList[2#-6&,9,30] (* or *) LinearRecurrence[{3,-2},{9,12},31]
    Table[ (3/2)*(4 + 2^n), {n, 1, 25}] (* G. C. Greubel, Sep 01 2016 *)

Formula

a(n) = 3*a(n-1) - 2*a(n-2), with a(1) = 9, a(2) = 12. - Harvey P. Dale, May 09 2012
From G. C. Greubel, Sep 01 2016: (Start)
a(n) = (3/2)*(4 + 2^n).
G.f.: 3*x*(3 - 5*x)/((1 - x)*(1 - 2*x)).
E.g.f.: (3/2)*(-5 + 4*exp(x) + exp(2*x)). (End)

Extensions

Definition adapted to offset by Georg Fischer, Jun 18 2021