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.

A014572 Continued fraction for Thue-Morse constant.

Original entry on oeis.org

0, 2, 2, 2, 1, 4, 3, 5, 2, 1, 4, 2, 1, 5, 44, 1, 4, 1, 2, 4, 1, 1, 1, 5, 14, 1, 50, 15, 5, 1, 1, 1, 4, 2, 1, 4, 1, 43, 1, 4, 1, 2, 1, 3, 16, 1, 2, 1, 2, 1, 50, 1, 2, 424, 1, 2, 5, 2, 1, 1, 1, 5, 5, 2, 22, 5, 1, 1, 1, 1274, 3, 5, 2, 1, 1, 1, 4, 1, 1, 15, 154, 7, 2, 1, 2, 2, 1, 2, 1, 1, 50
Offset: 0

Views

Author

Keywords

Examples

			A014571 = 0.4124540336401075977833613... = 0 + 1/(2 + 1/(2 + 1/(2 + 1/(1 + ...)))). - _Harry J. Smith_, Apr 25 2009
		

Crossrefs

Cf. A014571.

Programs

  • Mathematica
    P = Sum[If[OddQ[Count[IntegerDigits[n, 2], 1]], 2^(-n-1), 0], {n, 0, 400}]; ContinuedFraction[P, 91] (* Jean-François Alcover, Oct 23 2012 *)
    (* ThueMorse function needs $Version >= 10.2 *)
    P = FromDigits[{ThueMorse /@ Range[0, 400], 0}, 2];
    ContinuedFraction[P, 91] (* Jean-François Alcover, Jan 30 2020 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=0.0; m=70000; for (n=1, m-1, x=x+x; x=x+sum(k=0, length(binary(n))-1, bittest(n, k))%2); x=x/2^m; y=contfrac(x); for (n=1, 20001, write("b014572.txt", n-1, " ", y[n])); } \\ Harry J. Smith, Apr 25 2009