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.

A115113 a(n) = 3*a(n-1) + 4*a(n-2), with a(0) = 2, a(1) = 6, a(2) = 10.

Original entry on oeis.org

2, 6, 10, 54, 202, 822, 3274, 13110, 52426, 209718, 838858, 3355446, 13421770, 53687094, 214748362, 858993462, 3435973834, 13743895350, 54975581386, 219902325558, 879609302218, 3518437208886, 14073748835530, 56294995342134, 225179981368522, 900719925474102
Offset: 0

Views

Author

Roger L. Bagula, Mar 06 2006

Keywords

Crossrefs

Programs

  • Magma
    I:=[6,10]; [2] cat [n le 2 select I[n] else 3*Self(n-1) + 4*Self(n-2): n in [1..49]]; // G. C. Greubel, Nov 23 2018
    
  • Mathematica
    Join[{2}, LinearRecurrence[{3, 4}, {6, 10}, 50]]
  • Maxima
    (a[0] : 2, a[1] : 6, a[2] : 10, a[n] := 3*a[n-1] + 4*a[n-2], makelist(a[n], n, 0, 50)); /* Franck Maminirina Ramaharo, Nov 23 2018 */
    
  • PARI
    x='x+O('x^50); Vec(2*(8*x^2-1)/((x+1)*(4*x-1))) \\ G. C. Greubel, Nov 23 2018
    
  • Sage
    s=(2*(8*x^2-1)/((x+1)*(4*x-1))).series(x,50); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 23 2018

Formula

From Colin Barker, Nov 13 2012: (Start)
a(n) = (-2*(7*(-1)^n - 2^(1 + 2*n)))/5 for n > 0.
a(n) = 3*a(n-1) + 4*a(n-2) for n > 2.
G.f.: 2*(8*x^2 - 1)/((x + 1)*(4*x - 1)). (End)
E.g.f.: (20 - 14*exp(-x) + 4*exp(4*x))/5. - Franck Maminirina Ramaharo, Nov 23 2018

Extensions

Edited, and new name from Franck Maminirina Ramaharo, Nov 23 2018, after Colin Barker's formula