OFFSET
0,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..20000
M. Beeler, R. W. Gosper, and R. Schroeppel, HAKMEM. Cambridge, MA: Mass. Institute of Technology Artificial Intelligence Laboratory, Memo AIM-239, Feb. 1972, Item 122, page 56. Also HTML transcription.
Y. Bugeaud, On the rational approximation to the Thue-Morse-Mahler numbers, Ann. Inst. Fourier, Grenoble, 61 (2011), pp. 2065-2076. See p. 2068.
Y. Bugeaud and M. Queffélec, On Rational Approximation of the Binary Thue-Morse-Mahler Number, Journal of Integer Sequences, 16 (2013), #13.2.3.
Eric Weisstein's World of Mathematics, Thue-Morse Constant.
G. Xiao, Contfrac
EXAMPLE
A014571 = 0.4124540336401075977833613... = 0 + 1/(2 + 1/(2 + 1/(2 + 1/(1 + ...)))). - Harry J. Smith, Apr 25 2009
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,cofr,changed
AUTHOR
STATUS
approved