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.

A098457 Farey Bisection Expansion of sqrt(7).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1
Offset: 1

Views

Author

John W. Layman, Sep 08 2004

Keywords

Comments

We define the Farey Bisection Expansion (FBE) of the nonnegative real number x to be the sequence {a(n)} of 0's and 1's determined as follows. Set na(0)=0, da(0)=1, nb(0)=1 and db(0)=0. For n=1, 2, 3,..., set num=na(n-1)+nb(n-1) and den=da(n-1)+db(n-1); if xA010121.

Examples

			G.f. = x + x^2 + x^4 + x^6 + x^7 + x^8 + x^9 + x^11 + x^13 + x^14 + x^15 + ...
		

Crossrefs

Programs

  • Magma
    &cat [[1, 1, 0, 1, 0, 1, 1]^^20]; // Wesley Ivan Hurt, Jul 11 2016
    
  • Maple
    seq(op([1, 1, 0, 1, 0, 1, 1]), n=0..20); # Wesley Ivan Hurt, Jul 11 2016
  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 1},{1, 1, 0, 1, 0, 1, 1},105] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    {a(n) = [1, 1, 0, 1, 0, 1, 1][(n-1)%7+1]}; /* Michael Somos, Dec 26 2016 */

Formula

From Wesley Ivan Hurt, Jul 11 2016: (Start)
G.f.: x * (1 + x + x^3 + x^5 + x^6) / (1 - x^7).
a(n) = a(n-7) for n>7.
a(n) = 1 - Sum_{k=1..4} floor((n + k)/7)*(-1)^k. (End)
a(n+1) = (-1)^(mod(mod(n, 7), 3)>0) * A131372(n). - Michael Somos, Dec 26 2016