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.

A022410 a(n) = a(n-1) + a(n-2) + 1 for n>1, a(0)=3, a(1)=11.

Original entry on oeis.org

3, 11, 15, 27, 43, 71, 115, 187, 303, 491, 795, 1287, 2083, 3371, 5455, 8827, 14283, 23111, 37395, 60507, 97903, 158411, 256315, 414727, 671043, 1085771, 1756815, 2842587, 4599403, 7441991, 12041395, 19483387, 31524783, 51008171, 82532955, 133541127
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((3+5*x-7*x^2)/((x-1)*(x^2+x-1)))); // G. C. Greubel, Feb 28 2018
  • Mathematica
    LinearRecurrence[{2, 0, -1}, {3, 11, 15}, 40] (* Bruno Berselli, Jul 27 2017 *)
  • PARI
    Vec((3+5*x-7*x^2)/((x-1)*(x^2+x-1)) + O(x^50)) \\ Colin Barker, Jul 27 2017
    
  • Python
    from sympy import lucas
    def a(n): return 4 * lucas(n + 1) - 1
    print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 27 2017
    

Formula

From R. J. Mathar, Mar 11 2011: (Start)
a(n+1) - a(n) = A156279(n).
G.f.: (3 + 5*x - 7*x^2) / ((x - 1)*(x^2 + x - 1)).
(End)
a(n) = A156279(n+1) - 1. - Bruno Berselli, Jul 27 2017
From Colin Barker, Jul 27 2017: (Start)
a(n) = 2^(-n)*(-2^n + 2*(1-sqrt(5))^(1+n) + 2*(1+sqrt(5))^(1+n)).
a(n) = 2*a(n-1) - a(n-3) for n>2.
(End)