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.

A010710 Period 2: repeat [4,5].

Original entry on oeis.org

4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4
Offset: 0

Views

Author

Keywords

Comments

Continued fraction of 2 + 2*sqrt(30)/5 = A176215. - R. J. Mathar, Nov 21 2011
Decimal expansion of 5/11. - Franklin T. Adams-Watters, Jan 25 2019
Also, a(n) is the number of binary sequences of length n+3 avoiding the subsequences 000, 001, 011, 111. For example, when n=5 the a(5)=5 sequences of length 8 are 01010101, 10101010, 01010100, 11010101, 11010100. - Miquel A. Fiol, Dec 28 2023

Crossrefs

Cf. A176215.

Programs

  • Mathematica
    From Stefano Spezia, Sep 07 2018: (Start)
    a[n_]:=-(1/2)*(-1)^n + 9/2; Array[a, 50, {0, 49}]
    a[n_]:=Floor[9*(n+1)/2] - Floor[9*n/2]; Array[a, 50, {0, 49}]
    a[n_]:= 4 + Mod[n,2]; Array[a, 50, {0, 49}]
    LinearRecurrence[{0, 1}, {4, 5}, 50]
    CoefficientList[Series[(4+5*x)/(1-x^2), {x, 0, 50}], x]
    (End)
  • PARI
    a(n)=4+n%2 \\ Jaume Oliver Lafont, Mar 20 2009
    
  • PARI
    a(n) = my(v=[4, 5]); v[n%2+1] \\ Felix Fröhlich, Sep 06 2018
    
  • PARI
    Vec((4+5*x)/(1-x^2) + O(x^100)) \\ Felix Fröhlich, Sep 06 2018

Formula

G.f.: (4+5*x)/(1-x^2). - Jaume Oliver Lafont, Mar 20 2009
a(n) = floor(9*(n+1)/2) - floor(9*n/2). - Hailey R. Olafson, Jul 17 2014
a(n) = 4 + (n mod 2). - Kritsada Moomuang, Sep 06 2018
From Wesley Ivan Hurt, Apr 20 2024: (Start)
a(n+2) = a(n).
a(n+1) = a(n) + (-1)^n.
a(n) = (9-(-1)^n)/2. (End)