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.
%I A098457 #23 Dec 14 2023 05:16:32 %S A098457 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, %T A098457 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, %U A098457 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 %N A098457 Farey Bisection Expansion of sqrt(7). %C A098457 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 x<n/b, set a(n)=0, na(n)=na(n-1), da(n)=da(n-1), nb(n)=num, db(n)=den, else set a(n)=1, na(n)=num, da(n)=den, nb(n)=nb(n-1), db(n)=db(n-1). (The process is akin to that of locating the zero of a function by the bisection method, simply recording which successive subinterval, the left or the right, the zero lies at each refinement.) The FBE of Sqrt[7] is periodic with period 7. The RUNS transform of FBE(x) is the sequence of partial quotients of the continued fraction of x. As can be seen, RUNS(FBE(Sqrt[7]))={2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1,...}, which is A010121. %H A098457 N. J. A. Sloane, <a href="/stern_brocot.html">Stern-Brocot or Farey Tree</a> %H A098457 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,1). %F A098457 From _Wesley Ivan Hurt_, Jul 11 2016: (Start) %F A098457 G.f.: x * (1 + x + x^3 + x^5 + x^6) / (1 - x^7). %F A098457 a(n) = a(n-7) for n>7. %F A098457 a(n) = 1 - Sum_{k=1..4} floor((n + k)/7)*(-1)^k. (End) %F A098457 a(n+1) = (-1)^(mod(mod(n, 7), 3)>0) * A131372(n). - _Michael Somos_, Dec 26 2016 %e A098457 G.f. = x + x^2 + x^4 + x^6 + x^7 + x^8 + x^9 + x^11 + x^13 + x^14 + x^15 + ... %p A098457 seq(op([1, 1, 0, 1, 0, 1, 1]), n=0..20); # _Wesley Ivan Hurt_, Jul 11 2016 %t A098457 LinearRecurrence[{0, 0, 0, 0, 0, 0, 1},{1, 1, 0, 1, 0, 1, 1},105] (* _Ray Chandler_, Aug 26 2015 *) %o A098457 (Magma) &cat [[1, 1, 0, 1, 0, 1, 1]^^20]; // _Wesley Ivan Hurt_, Jul 11 2016 %o A098457 (PARI) {a(n) = [1, 1, 0, 1, 0, 1, 1][(n-1)%7+1]}; /* _Michael Somos_, Dec 26 2016 */ %Y A098457 Cf. A010121, A097853, A098458, A131372. %K A098457 nonn,easy %O A098457 1,1 %A A098457 _John W. Layman_, Sep 08 2004