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.

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

Original entry on oeis.org

1, 2, 7, 17, 37, 77, 157, 317, 637, 1277, 2557, 5117, 10237, 20477, 40957, 81917, 163837, 327677, 655357, 1310717, 2621437, 5242877, 10485757, 20971517, 41943037, 83886077, 167772157, 335544317, 671088637, 1342177277, 2684354557
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of 1,1,4,1,4,1,4,1,4,1,4,1,4,1,4,... - Philippe Deleham, Jan 05 2009

Crossrefs

Programs

  • Magma
    [1] cat [5*2^n-3 : n in [0..30]]; // Vincenzo Librandi, Nov 11 2011
    
  • Mathematica
    Join[{1}, Table[ 5*2^(n - 1) - 3, {n, 1, 10}]] (* or *) Join[{1, 2, 7}, LinearRecurrence[{3, -2}, {17, 37}, 10]] (* G. C. Greubel, Sep 02 2016 *)
  • PARI
    a(n)=if(n, 5<<(n-1)-3, 1) \\ Charles R Greathouse IV, Sep 02 2016

Formula

From Philippe Deléham, Jan 05 2009: (Start)
a(n) = 3*a(n-1) - 2*a(n-2), n > 2.
a(n) = 2*a(n-1) + 3, n > 1.
a(n) = 5*2^(n-1) - 3, n >= 1. (End)
E.g.f.: (1/2)*(3 - 6*exp(x) + 5*exp(2*x)). - G. C. Greubel, Sep 02 2016

Extensions

a(0) added by Philippe Deléham, Jan 05 2009