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.

Showing 1-10 of 18 results. Next

A321071 Twice the Thue-Morse constant (A014571).

Original entry on oeis.org

8, 2, 4, 9, 0, 8, 0, 6, 7, 2, 8, 0, 2, 1, 5, 1, 9, 5, 5, 6, 6, 7, 2, 2, 7, 3, 6, 5, 1, 6, 9, 1, 0, 5, 6, 6, 1, 7, 8, 9, 5, 6, 7, 4, 8, 9, 1, 1, 5, 3, 9, 1, 1, 5, 1, 4, 6, 7, 5, 8, 8, 3, 0, 6, 9, 7, 5, 8, 7, 1, 8, 4, 7, 3, 1, 5, 6, 5, 1, 7, 7, 9, 2, 7, 6, 0, 9, 0, 8, 0
Offset: 0

Views

Author

Jianing Song, Oct 27 2018

Keywords

Comments

This is the value of the g.f. of A010060 at x = 1/2. This number is transcendental.

Examples

			Equals 2^(-1) + 2^(-2) + 2^(-4) + 2^(-7) + ... = 0.11010011001011010..._2 = 0.82490806728021519...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 6.8, p. 437.

Crossrefs

Programs

  • Mathematica
    P = FromDigits[{ThueMorse /@ Range[0, 400], 0}, 2];
    RealDigits[2P, 10, 105][[1]] (* Jean-François Alcover, Apr 21 2021 *)
  • PARI
    1-prodinf(n=0, 1-1.>>2^n)/2

Formula

Equals Sum_{k>=0} A010060(k)*2^(-k) = 1 - (Product_{k>=0} (1 - 2^(-2^k)))/2.
Equals Sum_{k>=1} 2^(-A000069(k)).

A010060 Thue-Morse sequence: let A_k denote the first 2^k terms; then A_0 = 0 and for k >= 0, A_{k+1} = A_k B_k, where B_k is obtained from A_k by interchanging 0's and 1's.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Named after Axel Thue, whose name is pronounced as if it were spelled "Tü" where the ü sound is roughly as in the German word üben. (It is incorrect to say "Too-ee" or "Too-eh".) - N. J. A. Sloane, Jun 12 2018
Also called the Thue-Morse infinite word, or the Morse-Hedlund sequence, or the parity sequence.
Fixed point of the morphism 0 --> 01, 1 --> 10, see example. - Joerg Arndt, Mar 12 2013
The sequence is cubefree (does not contain three consecutive identical blocks) [see Offner for a direct proof] and is overlap-free (does not contain XYXYX where X is 0 or 1 and Y is any string of 0's and 1's).
a(n) = "parity sequence" = parity of number of 1's in binary representation of n.
To construct the sequence: alternate blocks of 0's and 1's of successive lengths A003159(k) - A003159(k-1), k = 1, 2, 3, ... (A003159(0) = 0). Example: since the first seven differences of A003159 are 1, 2, 1, 1, 2, 2, 2, the sequence starts with 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0. - Emeric Deutsch, Jan 10 2003
Characteristic function of A000069 (odious numbers). - Ralf Stephan, Jun 20 2003
a(n) = S2(n) mod 2, where S2(n) = sum of digits of n, n in base-2 notation. There is a class of generalized Thue-Morse sequences: Let Sk(n) = sum of digits of n; n in base-k notation. Let F(t) be some arithmetic function. Then a(n)= F(Sk(n)) mod m is a generalized Thue-Morse sequence. The classical Thue-Morse sequence is the case k=2, m=2, F(t)= 1*t. - Ctibor O. Zizka, Feb 12 2008 (with correction from Daniel Hug, May 19 2017)
More generally, the partial sums of the generalized Thue-Morse sequences a(n) = F(Sk(n)) mod m are fractal, where Sk(n) is sum of digits of n, n in base k; F(t) is an arithmetic function; m integer. - Ctibor O. Zizka, Feb 25 2008
Starting with offset 1, = running sums mod 2 of the kneading sequence (A035263, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); also parity of A005187: (1, 3, 4, 7, 8, 10, 11, 15, 16, 18, 19, ...). - Gary W. Adamson, Jun 15 2008
Generalized Thue-Morse sequences mod n (n>1) = the array shown in A141803. As n -> infinity the sequences -> (1, 2, 3, ...). - Gary W. Adamson, Jul 10 2008
The Thue-Morse sequence for N = 3 = A053838, (sum of digits of n in base 3, mod 3): (0, 1, 2, 1, 2, 0, 2, 0, 1, 1, 2, ...) = A004128 mod 3. - Gary W. Adamson, Aug 24 2008
For all positive integers k, the subsequence a(0) to a(2^k-1) is identical to the subsequence a(2^k+2^(k-1)) to a(2^(k+1)+2^(k-1)-1). That is to say, the first half of A_k is identical to the second half of B_k, and the second half of A_k is identical to the first quarter of B_{k+1}, which consists of the k/2 terms immediately following B_k.
Proof: The subsequence a(2^k+2^(k-1)) to a(2^(k+1)-1), the second half of B_k, is by definition formed from the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k, by interchanging its 0's and 1's. In turn, the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k, which is by definition also B_{k-1}, is by definition formed from the subsequence a(0) to a(2^(k-1)-1), the first half of A_k, which is by definition also A_{k-1}, by interchanging its 0's and 1's. Interchanging the 0's and 1's of a subsequence twice leaves it unchanged, so the subsequence a(2^k+2^(k-1)) to a(2^(k+1)-1), the second half of B_k, must be identical to the subsequence a(0) to a(2^(k-1)-1), the first half of A_k.
Also, the subsequence a(2^(k+1)) to a(2^(k+1)+2^(k-1)-1), the first quarter of B_{k+1}, is by definition formed from the subsequence a(0) to a(2^(k-1)-1), the first quarter of A_{k+1}, by interchanging its 0's and 1's. As noted above, the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k, which is by definition also B_{k-1}, is by definition formed from the subsequence a(0) to a(2^(k-1)-1), which is by definition A_{k-1}, by interchanging its 0's and 1's, as well. If two subsequences are formed from the same subsequence by interchanging its 0's and 1's then they must be identical, so the subsequence a(2^(k+1)) to a(2^(k+1)+2^(k-1)-1), the first quarter of B_{k+1}, must be identical to the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k.
Therefore the subsequence a(0), ..., a(2^(k-1)-1), a(2^(k-1)), ..., a(2^k-1) is identical to the subsequence a(2^k+2^(k-1)), ..., a(2^(k+1)-1), a(2^(k+1)), ..., a(2^(k+1)+2^(k-1)-1), QED.
According to the German chess rules of 1929 a game of chess was drawn if the same sequence of moves was repeated three times consecutively. Euwe, see the references, proved that this rule could lead to infinite games. For his proof he reinvented the Thue-Morse sequence. - Johannes W. Meijer, Feb 04 2010
"Thue-Morse 0->01 & 1->10, at each stage append the previous with its complement. Start with 0, 1, 2, 3 and write them in binary. Next calculate the sum of the digits (mod 2) - that is divide the sum by 2 and use the remainder." Pickover, The Math Book.
Let s_2(n) be the sum of the base-2 digits of n and epsilon(n) = (-1)^s_2(n), the Thue-Morse sequence, then prod(n >= 0, ((2*n+1)/(2*n+2))^epsilon(n) ) = 1/sqrt(2). - Jonathan Vos Post, Jun 06 2012
Dekking shows that the constant obtained by interpreting this sequence as a binary expansion is transcendental; see also "The Ubiquitous Prouhet-Thue-Morse Sequence". - Charles R Greathouse IV, Jul 23 2013
Drmota, Mauduit, and Rivat proved that the subsequence a(n^2) is normal--see A228039. - Jonathan Sondow, Sep 03 2013
Although the probability of a 0 or 1 is equal, guesses predicated on the latest bit seen produce a correct match 2 out of 3 times. - Bill McEachen, Mar 13 2015
From a(0) to a(2n+1), there are n+1 terms equal to 0 and n+1 terms equal to 1 (see Hassan Tarfaoui link, Concours Général 1990). - Bernard Schott, Jan 21 2022

Examples

			The evolution starting at 0 is:
  0
  0, 1
  0, 1, 1, 0
  0, 1, 1, 0, 1, 0, 0, 1
  0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0
  0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1
  .......
A_2 = 0 1 1 0, so B_2 = 1 0 0 1 and A_3 = A_2 B_2 = 0 1 1 0 1 0 0 1.
From _Joerg Arndt_, Mar 12 2013: (Start)
The first steps of the iterated substitution are
Start: 0
Rules:
  0 --> 01
  1 --> 10
-------------
0:   (#=1)
  0
1:   (#=2)
  01
2:   (#=4)
  0110
3:   (#=8)
  01101001
4:   (#=16)
  0110100110010110
5:   (#=32)
  01101001100101101001011001101001
6:   (#=64)
  0110100110010110100101100110100110010110011010010110100110010110
(End)
From _Omar E. Pol_, Oct 28 2013: (Start)
Written as an irregular triangle in which row lengths is A011782, the sequence begins:
  0;
  1;
  1,0;
  1,0,0,1;
  1,0,0,1,0,1,1,0;
  1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1;
  1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0;
It appears that: row j lists the first A011782(j) terms of A010059, with j >= 0; row sums give A166444 which is also 0 together with A011782; right border gives A000035.
(End)
		

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 15.
  • Jason Bell, Michael Coons, and Eric Rowland, "The Rational-Transcendental Dichotomy of Mahler Functions", Journal of Integer Sequences, Vol. 16 (2013), #13.2.10.
  • J. Berstel and J. Karhumaki, Combinatorics on words - a tutorial, Bull. EATCS, #79 (2003), pp. 178-228.
  • B. Bollobas, The Art of Mathematics: Coffee Time in Memphis, Cambridge, 2006, p. 224.
  • S. Brlek, Enumeration of factors in the Thue-Morse word, Discrete Applied Math., 24 (1989), 83-96. doi:10.1016/0166-218X(92)90274-E.
  • Yann Bugeaud and Guo-Niu Han, A combinatorial proof of the non-vanishing of Hankel determinants of the Thue-Morse sequence, Electronic Journal of Combinatorics 21(3) (2014), #P3.26.
  • 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.
  • Currie, James D. "Non-repetitive words: Ages and essences." Combinatorica 16.1 (1996): 19-40
  • Colin Defant, Anti-Power Prefixes of the Thue-Morse Word, Journal of Combinatorics, 24(1) (2017), #P1.32
  • F. M. Dekking, Transcendance du nombre de Thue-Morse, Comptes Rendus de l'Academie des Sciences de Paris 285 (1977), pp. 157-160.
  • F. M. Dekking, On repetitions of blocks in binary sequences. J. Combinatorial Theory Ser. A 20 (1976), no. 3, pp. 292-299. MR0429728(55 #2739)
  • Dekking, Michel, Michel Mendès France, and Alf van der Poorten. "Folds." The Mathematical Intelligencer, 4.3 (1982): 130-138 & front cover, and 4:4 (1982): 173-181 (printed in two parts).
  • Dubickas, Artūras. On a sequence related to that of Thue-Morse and its applications. Discrete Math. 307 (2007), no. 9-10, 1082--1093. MR2292537 (2008b:11086).
  • Fabien Durand, Julien Leroy, and Gwenaël Richomme, "Do the Properties of an S-adic Representation Determine Factor Complexity?", Journal of Integer Sequences, Vol. 16 (2013), #13.2.6.
  • M. Euwe, Mengentheoretische Betrachtungen Über das Schachspiel, Proceedings Koninklijke Nederlandse Akademie van Wetenschappen, Amsterdam, Vol. 32 (5): 633-642, 1929.
  • S. Ferenczi, Complexity of sequences and dynamical systems, Discrete Math., 206 (1999), 145-154.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 6.8.
  • W. H. Gottschalk and G. A. Hedlund, Topological Dynamics. American Mathematical Society, Colloquium Publications, Vol. 36, Providence, RI, 1955, p. 105.
  • J. Grytczuk, Thue type problems for graphs, points and numbers, Discrete Math., 308 (2008), 4419-4429.
  • A. Hof, O. Knill and B. Simon, Singular continuous spectrum for palindromic Schroedinger operators, Commun. Math. Phys. 174 (1995), 149-159.
  • Mari Huova and Juhani Karhumäki, "On Unavoidability of k-abelian Squares in Pure Morphic Words", Journal of Integer Sequences, Vol. 16 (2013), #13.2.9.
  • B. Kitchens, Review of "Computational Ergodic Theory" by G. H. Choe, Bull. Amer. Math. Soc., 44 (2007), 147-155.
  • Le Breton, Xavier, Linear independence of automatic formal power series. Discrete Math. 306 (2006), no. 15, 1776-1780.
  • M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 23.
  • Donald MacMurray, A mathematician gives an hour to chess, Chess Review 6 (No. 10, 1938), 238. [Discusses Marston's 1938 article]
  • Mauduit, Christian. Multiplicative properties of the Thue-Morse sequence. Period. Math. Hungar. 43 (2001), no. 1-2, 137--153. MR1830572 (2002i:11081)
  • C. A. Pickover, Wonders of Numbers, Adventures in Mathematics, Mind and Meaning, Chapter 17, 'The Pipes of Papua,' Oxford University Press, Oxford, England, 2000, pages 34-38.
  • C. A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.
  • Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 316.
  • Narad Rampersad and Elise Vaslet, "On Highly Repetitive and Power Free Words", Journal of Integer Sequences, Vol. 16 (2013), #13.2.7.
  • G. Richomme, K. Saari, L. Q. Zamboni, Abelian complexity in minimal subshifts, J. London Math. Soc. 83(1) (2011) 79-95.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • M. Rigo, P. Salimov, and E. Vandomme, "Some Properties of Abelian Return Words", Journal of Integer Sequences, Vol. 16 (2013), #13.2.5.
  • Benoit Rittaud, Elise Janvresse, Emmanuel Lesigne and Jean-Christophe Novelli, Quand les maths se font discrètes, Le Pommier, 2008 (ISBN 978-2-7465-0370-0).
  • A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 6.
  • Shallit, J. O. "On Infinite Products Associated with Sums of Digits." J. Number Th. 21, 128-134, 1985.
  • Ian Stewart, "Feedback", Mathematical Recreations Column, Scientific American, 274 (No. 3, 1996), page 109 [Historical notes on this sequence]
  • Thomas Stoll, On digital blocks of polynomial values and extractions in the Rudin-Shapiro sequence, RAIRO - Theoretical Informatics and Applications (RAIRO: ITA), EDP Sciences, 2016, 50, pp. 93-99. .
  • A. Thue. Über unendliche Zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiania, No. 7 (1906), 1-22.
  • A. Thue, Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiania, 1 (1912), 1-67.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 890.

Crossrefs

Cf. A001285 (for 1, 2 version), A010059 (for 1, 0 version), A106400 (for +1, -1 version), A048707. A010060(n)=A000120(n) mod 2.
Cf. A007413, A080813, A080814, A036581, A108694. See also the Thue (or Roth) constant A014578, also A014571.
Run lengths give A026465. Backward first differences give A029883.
Cf. A004128, A053838, A059448, A171900, A161916, A214212, A005942 (subword complexity), A010693 (Abelian complexity), A225186 (squares), A228039 (a(n^2)), A282317.
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

Programs

  • Haskell
    a010060 n = a010060_list !! n
    a010060_list =
       0 : interleave (complement a010060_list) (tail a010060_list)
       where complement = map (1 - )
             interleave (x:xs) ys = x : interleave ys xs
    -- Doug McIlroy (doug(AT)cs.dartmouth.edu), Jun 29 2003
    -- Edited by Reinhard Zumkeller, Oct 03 2012
    
  • Maple
    s := proc(k) local i, ans; ans := [ 0,1 ]; for i from 0 to k do ans := [ op(ans),op(map(n->(n+1) mod 2, ans)) ] od; return ans; end; t1 := s(6); A010060 := n->t1[n]; # s(k) gives first 2^(k+2) terms.
    a := proc(k) b := [0]: for n from 1 to k do b := subs({0=[0,1], 1=[1,0]},b) od: b; end; # a(k), after the removal of the brackets, gives the first 2^k terms. # Example: a(3); gives [[[[0, 1], [1, 0]], [[1, 0], [0, 1]]]]
    A010060:=proc(n)
        add(i,i=convert(n, base, 2)) mod 2 ;
    end proc:
    seq(A010060(n),n=0..104); # Emeric Deutsch, Mar 19 2005
    map(`-`,convert(StringTools[ThueMorse](1000),bytes),48); # Robert Israel, Sep 22 2014
  • Mathematica
    Table[ If[ OddQ[ Count[ IntegerDigits[n, 2], 1]], 1, 0], {n, 0, 100}];
    mt = 0; Do[ mt = ToString[mt] <> ToString[(10^(2^n) - 1)/9 - ToExpression[mt] ], {n, 0, 6} ]; Prepend[ RealDigits[ N[ ToExpression[mt], 2^7] ] [ [1] ], 0]
    Mod[ Count[ #, 1 ]& /@Table[ IntegerDigits[ i, 2 ], {i, 0, 2^7 - 1} ], 2 ] (* Harlan J. Brothers, Feb 05 2005 *)
    Nest[ Flatten[ # /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 7] (* Robert G. Wilson v Sep 26 2006 *)
    a[n_] := If[n == 0, 0, If[Mod[n, 2] == 0, a[n/2], 1 - a[(n - 1)/2]]] (* Ben Branman, Oct 22 2010 *)
    a[n_] := Mod[Length[FixedPointList[BitAnd[#, # - 1] &, n]], 2] (* Jan Mangaldan, Jul 23 2015 *)
    Table[2/3 (1 - Cos[Pi/3 (n - Sum[(-1)^Binomial[n, k], {k, 1, n}])]), {n, 0, 100}] (* or, for version 10.2 or higher *) Table[ThueMorse[n], {n, 0, 100}] (* Vladimir Reshetnikov, May 06 2016 *)
    ThueMorse[Range[0, 100]] (* The program uses the ThueMorse function from Mathematica version 11 *) (* Harvey P. Dale, Aug 11 2016 *)
    Nest[Join[#, 1 - #] &, {0}, 7] (* Paolo Xausa, Oct 25 2024 *)
  • PARI
    a(n)=if(n<1,0,sum(k=0,length(binary(n))-1,bittest(n,k))%2)
    
  • PARI
    a(n)=if(n<1,0,subst(Pol(binary(n)), x,1)%2)
    
  • PARI
    default(realprecision, 6100); x=0.0; m=20080; for (n=1, m-1, x=x+x; x=x+sum(k=0, length(binary(n))-1, bittest(n, k))%2); x=2*x/2^m; for (n=0, 20000, d=floor(x); x=(x-d)*2; write("b010060.txt", n, " ", d)); \\ Harry J. Smith, Apr 28 2009
    
  • PARI
    a(n)=hammingweight(n)%2 \\ Charles R Greathouse IV, Mar 22 2013
    
  • Python
    A010060_list = [0]
    for _ in range(14):
        A010060_list += [1-d for d in A010060_list] # Chai Wah Wu, Mar 04 2016
    
  • Python
    def A010060(n): return n.bit_count()&1 # Chai Wah Wu, Mar 01 2023
    
  • R
    maxrow <- 8 # by choice
    b01 <- 1
    for(m in 0:maxrow) for(k in 0:(2^m-1)){
    b01[2^(m+1)+    k] <-   b01[2^m+k]
    b01[2^(m+1)+2^m+k] <- 1-b01[2^m+k]
    }
    (b01 <- c(0,b01))
    # Yosu Yurramendi, Apr 10 2017

Formula

a(2n) = a(n), a(2n+1) = 1 - a(n), a(0) = 0. Also, a(k+2^m) = 1 - a(k) if 0 <= k < 2^m.
If n = Sum b_i*2^i is the binary expansion of n then a(n) = Sum b_i (mod 2).
Let S(0) = 0 and for k >= 1, construct S(k) from S(k-1) by mapping 0 -> 01 and 1 -> 10; sequence is S(infinity).
G.f.: (1/(1 - x) - Product_{k >= 0} (1 - x^(2^k)))/2. - Benoit Cloitre, Apr 23 2003
a(0) = 0, a(n) = (n + a(floor(n/2))) mod 2; also a(0) = 0, a(n) = (n - a(floor(n/2))) mod 2. - Benoit Cloitre, Dec 10 2003
a(n) = -1 + (Sum_{k=0..n} binomial(n,k) mod 2) mod 3 = -1 + A001316(n) mod 3. - Benoit Cloitre, May 09 2004
Let b(1) = 1 and b(n) = b(ceiling(n/2)) - b(floor(n/2)) then a(n-1) = (1/2)*(1 - b(2n-1)). - Benoit Cloitre, Apr 26 2005
a(n) = 1 - A010059(n) = A001285(n) - 1. - Ralf Stephan, Jun 20 2003
a(n) = A001969(n) - 2n. - Franklin T. Adams-Watters, Aug 28 2006
a(n) = A115384(n) - A115384(n-1) for n > 0. - Reinhard Zumkeller, Aug 26 2007
For n >= 0, a(A004760(n+1)) = 1 - a(n). - Vladimir Shevelev, Apr 25 2009
a(A160217(n)) = 1 - a(n). - Vladimir Shevelev, May 05 2009
a(n) == A000069(n) (mod 2). - Robert G. Wilson v, Jan 18 2012
a(n) = A000035(A000120(n)). - Omar E. Pol, Oct 26 2013
a(n) = A000035(A193231(n)). - Antti Karttunen, Dec 27 2013
a(n) + A181155(n-1) = 2n for n >= 1. - Clark Kimberling, Oct 06 2014
G.f. A(x) satisfies: A(x) = x / (1 - x^2) + (1 - x) * A(x^2). - Ilya Gutkovskiy, Jul 29 2021
From Bernard Schott, Jan 21 2022: (Start)
a(n) = a(n*2^k) for k >= 0.
a((2^m-1)^2) = (1-(-1)^m)/2 (see Hassan Tarfaoui link, Concours Général 1990). (End)

A215016 Decimal expansion of the product of 1 - 1/2^2^n over all n >= 0.

Original entry on oeis.org

3, 5, 0, 1, 8, 3, 8, 6, 5, 4, 3, 9, 5, 6, 9, 6, 0, 8, 8, 6, 6, 5, 5, 4, 5, 2, 6, 9, 6, 6, 1, 7, 8, 8, 6, 7, 6, 4, 2, 0, 8, 6, 5, 0, 2, 1, 7, 6, 9, 2, 1, 7, 6, 9, 7, 0, 6, 4, 8, 2, 3, 3, 8, 6, 0, 4, 8, 2, 5, 6, 3, 0, 5, 3, 6, 8, 6, 9, 6, 4, 4, 1
Offset: 0

Views

Author

Keywords

Comments

Can be used to efficiently compute A014571: A014571 = 1/2 - (1/4) * A215016.

Examples

			0.35018386543956960886655452696617886764208650217692176970648233860482563...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[NProduct[1 - 1/2^2^n, {n, 0, Infinity}, WorkingPrecision -> 120]][[1]] (* Alonso del Arte, Jul 31 2012 *)
  • PARI
    prodinf(n=0,1-1.>>2^n)

Formula

Equals Sum_{n>=0} A106400(n)/2^n. - Robert FERREOL, Jan 10 2022
From Amiram Eldar, Feb 19 2024: (Start)
Equals Product_{n>=0} (1 - 1/A001146(n)).
Equals 2/A258716.
Equals 1/(3/2 + A258714). (End)

A048707 Numerators of ratios converging to Thue-Morse constant.

Original entry on oeis.org

0, 1, 6, 105, 27030, 1771476585, 7608434000728254870, 140350834813144189858090274002849666665, 47758914269546354982683078068829456704164423862093743397580034411621752859030
Offset: 0

Views

Author

Antti Karttunen, Mar 09 1999

Keywords

Comments

Also interpret each iteration of the construction of the Thue-Morse constant as a binary number converted to a decimal number. Thus (0_b, 01_b, 0110_b, 01101001_b ...) gives the present sequence in decimal. - Robert G. Wilson v, Sep 22 2006
a(n) corresponds to the binary value of the truth-table for the xor operator with n-arguments. - Joe Riel (joer(AT)san.rr.com), Jan 31 2010

Crossrefs

The denominators are given by A001146. Consists of every 2^n-th term of A019300. Cf. A048708 (same sequence in hexadecimal) and A014571, A010060, A014572.

Programs

  • Mathematica
    Table[ FromDigits[ Nest[ Flatten[ #1 /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, n], 2], {n, 0, 8}] (* Robert G. Wilson v, Sep 22 2006 *)
  • Scheme
    ;returns all but the last element of a list
    (define rdc(lambda(x)(if(null? (cdr x))'()(cons (car x) (rdc (cdr x))))))
    ;gets the two's complement of a given bit
    (define twosComplement (lambda (x)(if (eq? x #\0) "1" "0" )))
    ;gets the two's complement of a string
    (define complementOfCurrent (lambda (x y z)(if (eq? (string-length y) z) y (complementOfCurrent (list->string (cdr (string->list x))) (string-append y (twosComplement (string-ref x 0))) z))))
    ;concatenates the two's complement of a string onto the current string, giving the next element in the TM sequence
    (define concatenateComplement (lambda (x i)(if(zero? i) x (concatenateComplement(string-append x (complementOfCurrent x "" (string-length x)))(- i 1)))))
    ;generates the TM sequence of length 2^x
    (define generateThue (lambda (x)(concatenateComplement "0" x)))
    ;if a bit is 1, get 2^i, where i is the index of that bit from right-left
    (define F (lambda (c i)(if (eq? c #\1) (expt 2 i) 0)))
    ;gathers the sum of 2^index for all indices corresponding to a 1
    (define fn (lambda (x sum i stop)(if (eq? i stop) sum (fn (list->string (rdc (string->list x))) (+ sum (F (string-ref x (-(string-length x) 1)) i)) (+ i 1)stop))))
    (define f (lambda (x)(fn (generateThue x) 0 0 (string-length (generateThue x)))))
    ;format: (f x)
    ;example: (f 10)
    ;by Ariel S Koiman, Apr 23 2013

Formula

a(0) = 0, a(n) = (a(n-1)+1)*((2^(2^(n-1)))-1).

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

A085394 Numerators of convergents to Thue-Morse constant.

Original entry on oeis.org

0, 1, 2, 5, 7, 33, 106, 563, 1232, 1795, 8412, 18619, 27031, 153774, 6793087, 6946861, 34580531, 41527392, 117635315, 512068652, 629703967, 1141772619, 1771476586, 9999155549, 141759654272, 151758809821, 7729700145322, 116097260989651
Offset: 1

Views

Author

Gary W. Adamson, Jun 27 2003

Keywords

Examples

			[2,2,2,1,4] = 33/80 = .4125
		

Crossrefs

Cf. A014571, A014572, A085395 (companion denominators).

Programs

  • Mathematica
    mt = 0; Do[ mt = ToString[mt] <> ToString[(10^(2^n) - 1)/9 - ToExpression[mt]], {n, 0, 7}]; d = RealDigits[ N[ ToExpression[mt], 2^7]][[1]]; a = 0; Do[ a = a + N[ d[[n]]/2^(n + 1), 100], {n, 1, 2^7}]; f[n_] := FromContinuedFraction[ ContinuedFraction[a, n]]; Table[ Numerator[f[n]], {n, 1, 28}]

Formula

In continued fraction form, the Thue-Morse constant .4124540336401...; is [2, 2, 2, 1, 4, 3, 5, 2, 1, 4...], with A014572(1) = 2, the first partial quotient. Underneath each term we write the convergents corresponding to the continued fraction: [2] = 1/2, [2, 2] = 2/5, [2, 2, 2] = 5/12 and so on, the convergents being: 1/2, 2/5, 5/12, 7/17, 33/80, 106/257, 563/1365, 1232/2987, 1795/4352, 8412/20395...where the latter = .412454032...

Extensions

Edited by Robert G. Wilson v, Jul 15 2003

A085395 Denominators of convergents to the Thue-Morse constant 0.41245403364...

Original entry on oeis.org

1, 2, 5, 12, 17, 80, 257, 1365, 2987, 4352, 20395, 45142, 65537, 372827, 16469925, 16842752, 83840933, 100683685, 285208303, 1241516897, 1526725200, 2768242097, 4294967297, 24243078582, 343698067445, 367941146027, 18740755368795
Offset: 1

Views

Author

Gary W. Adamson, Jun 27 2003

Keywords

Examples

			[2, 2, 2, 1, 4] = 33/80 = 0.4125.
		

Crossrefs

Companion numerators are A085394.

Programs

  • Mathematica
    mt = 0; Do[ mt = ToString[mt] <> ToString[(10^(2^n) - 1)/9 - ToExpression[mt]], {n, 0, 7}]; d = RealDigits[ N[ ToExpression[mt], 2^7]][[1]]; a = 0; Do[ a = a + N[ d[[n]]/2^(n + 1), 100], {n, 1, 2^7}]; f[n_] := FromContinuedFraction[ ContinuedFraction[a, n]]; Table[ Denominator[f[n]], {n, 1, 28}]

Formula

Write the convergents directly underneath the partial quotients (A014572) for 0.412454033... starting with the first partial quotient, 2: [2, 2, 2, 1, 4, 3, 5, 2, 1, 4, ...] such that [2] = 1/2, [2, 2] = 2/5, [ 2, 2, 2] = 5/12 and so on, the convergents being: 1/2, 2/5, 5/12, 7/17, 33/80, 106, 257, 563/1365, 1232/2987, 1795/4352, 8412/20395, ...

Extensions

Edited by Robert G. Wilson v, Jul 15 2003

A058631 Continued fraction for the Morse-Thue constant .01101001100101101001... formed from A010060.

Original entry on oeis.org

0, 90, 1, 4, 1, 3, 5, 4, 6, 8, 4, 5, 4, 1, 3, 30, 1, 5, 3, 2, 65, 1, 37, 20, 2, 1, 5, 1, 14, 2, 1, 4, 1, 30, 2, 1, 32, 3, 1, 4, 5, 80, 1, 4, 1, 4, 3, 1, 3, 6, 7, 9, 1, 7, 1, 4, 1, 9, 1, 1, 1, 1, 4, 2, 9, 1, 1, 2, 10, 3, 1, 69, 1, 2, 12, 1, 1, 1, 1, 5, 1, 1, 1, 2, 5, 4, 1, 1, 27, 3, 3, 1, 2
Offset: 0

Views

Author

Robert G. Wilson v, Dec 29 2000

Keywords

Comments

The constant is Sum A010060(n)*10^(-n).

Crossrefs

More terms from R. K. Guy, Jun 15 2001

Programs

  • Mathematica
    mt = 0; Do[ mt = ToString[ mt ] <> ToString[ (10^(2^n) - 1)/9 - ToExpression[ mt ] ], {n, 0, 7} ]; ContinuedFraction[ N[ ToExpression[ mt ]/10^(2^8), 2^8 ], 75 ]

A122570 Consider the Thue-Morse sequence (A010060) at each iteration. Read each reversed string as a binary number and convert it to a decimal number.

Original entry on oeis.org

0, 2, 6, 150, 27030, 2523490710, 7608434000728254870, 199931532107794273605284333428918544790, 47758914269546354982683078068829456704164423862093743397580034411621752859030
Offset: 1

Views

Author

Roger L. Bagula, Sep 17 2006

Keywords

Examples

			The first three terms of A010060 are 0, 1, 1, so a(3) = 110_2 = 6.
		

Crossrefs

Programs

  • Mathematica
    FromDigits[ #, 2] & /@ NestList[Flatten[ # /. {1 -> {0, 1}, 0 -> {1, 0}}] &, {0}, 8] (* Robert G. Wilson v, Sep 25 2006 *)

Extensions

Edited by Robert G. Wilson v, Sep 25 2006

A019299 First n elements of Thue-Morse sequence A010059 read as a binary number.

Original entry on oeis.org

1, 2, 4, 9, 18, 37, 75, 150, 300, 601, 1203, 2406, 4813, 9626, 19252, 38505, 77010, 154021, 308043, 616086, 1232173, 2464346, 4928692, 9857385, 19714771, 39429542, 78859084, 157718169, 315436338, 630872677, 1261745355, 2523490710, 5046981420
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A001969 (evil numbers), A010060, A014571, A125050.

Programs

  • Maple
    a:= n-> add((1+(-1)^irem(add(j, j=convert(n-i, base, 2)), 2))*2^i/2, i=0..n):
    seq(a(n), n=0..32); # Lorenzo Sauras Altuzarra, Jan 31 2023

Formula

a(n) = Sum_{k=0..n} (1+(-1)^A010060(n-k))*2^k/2. - Paul Barry, Jan 06 2005
From Lorenzo Sauras Altuzarra, Jan 31 2023: (Start)
a(n+1) = 2*a(n) + 1 if a(n) is evil; a(n+1) = 2*a(n) otherwise (see also A125050).
a(n) = floor((1-c)*2^(n+1)), where c = A014571 is the Thue - Morse constant. (End)
Showing 1-10 of 18 results. Next