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.

A022408 a(n) = a(n-1) + a(n-2) + 1, with a(0)=3, a(1)=9.

Original entry on oeis.org

3, 9, 13, 23, 37, 61, 99, 161, 261, 423, 685, 1109, 1795, 2905, 4701, 7607, 12309, 19917, 32227, 52145, 84373, 136519, 220893, 357413, 578307, 935721, 1514029, 2449751, 3963781, 6413533, 10377315, 16790849, 27168165, 43959015, 71127181, 115086197, 186213379, 301299577, 487512957
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A022382.

Programs

  • Magma
    I:=[3,9,13]; [n le 3 select I[n] else 2*Self(n-1) - Self(n-3): n in [1..40]]; // G. C. Greubel, Mar 01 2018
  • Mathematica
    CoefficientList[Series[(3+3*x-5*x^2)/((x-1)*(x^2+x-1)), {x, 0, 50}], x] (* or *) LinearRecurrence[{2,0,-1}, {3,9,13}, 50] (* G. C. Greubel, Mar 01 2018 *)
    nxt[{a_,b_}]:={b,a+b+1}; NestList[nxt,{3,9},40][[;;,1]] (* Harvey P. Dale, Sep 13 2024 *)
  • PARI
    x='x+O('x^40); Vec((3+3*x-5*x^2)/((x-1)*(x^2+x-1))) \\ G. C. Greubel, Mar 01 2018
    

Formula

From R. J. Mathar, Mar 11 2011: (Start)
a(n+1) - a(n) = A022382(n-1).
G.f.: ( 3+3*x-5*x^2 ) / ( (x-1)*(x^2+x-1) ). (End)
a(n) = 2*Lucas(n+1) + 2*Fibonacci(n+2) - 1. - Greg Dresden, Oct 10 2020

Extensions

Terms a(31) onward added by G. C. Greubel, Mar 01 2018