WOLFRAM

gives the n^(th) term in the ThueMorse sequence.

Details

  • ThueMorse[n] is 1 exactly when n has an odd number of 1s in its binary expansion.
  • ThueMorse gives the sequence generated by the substitution starting from .
  • ThueMorse[0] is the beginning of the ThueMorse sequence.
  • ThueMorse automatically threads over lists.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

The fifth element of the ThueMorse sequence:

Out[1]=1

Five has an even number of ones in its binary expansion:

The first 10 elements of the sequence:

Out[1]=1

Display the values alongside the binary expansion:

Out[2]=2

Scope  (2)Survey of the scope of standard use cases

ThueMorse threads over lists:

Out[1]=1

Evaluate at large integers:

Out[1]=1

Applications  (1)Sample problems that can be solved with this function

The Koch snowflake:

Out[1]=1

Properties & Relations  (8)Properties of the function, and connections to other functions

ThueMorse[n] is 1 if and only if n has an odd number of 1s in its binary form:

Out[1]=1

The ThueMorse sequence can arise from a nested list:

Out[1]=1

The ThueMorse sequence can arise from the center column of a cellular automaton:

Out[1]=1

The ThueMorse sequence has a closed form as a hypergeometric function:

Out[1]=1

Solution to a recurrence relation:

Out[1]=1

Cube-free sequence:

Out[3]=3

Overlap-free sequence:

Out[3]=3

The ThueMorse sequence has a nested structure:

Out[1]=1

Neat Examples  (1)Surprising or curious use cases

Paths at different angles based on ThueMorse sequences:

Out[1]=1
Wolfram Research (2015), ThueMorse, Wolfram Language function, https://reference.wolfram.com/language/ref/ThueMorse.html.
Wolfram Research (2015), ThueMorse, Wolfram Language function, https://reference.wolfram.com/language/ref/ThueMorse.html.

Text

Wolfram Research (2015), ThueMorse, Wolfram Language function, https://reference.wolfram.com/language/ref/ThueMorse.html.

Wolfram Research (2015), ThueMorse, Wolfram Language function, https://reference.wolfram.com/language/ref/ThueMorse.html.

CMS

Wolfram Language. 2015. "ThueMorse." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ThueMorse.html.

Wolfram Language. 2015. "ThueMorse." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ThueMorse.html.

APA

Wolfram Language. (2015). ThueMorse. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ThueMorse.html

Wolfram Language. (2015). ThueMorse. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ThueMorse.html

BibTeX

@misc{reference.wolfram_2025_thuemorse, author="Wolfram Research", title="{ThueMorse}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/ThueMorse.html}", note=[Accessed: 29-April-2025 ]}

@misc{reference.wolfram_2025_thuemorse, author="Wolfram Research", title="{ThueMorse}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/ThueMorse.html}", note=[Accessed: 29-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_thuemorse, organization={Wolfram Research}, title={ThueMorse}, year={2015}, url={https://reference.wolfram.com/language/ref/ThueMorse.html}, note=[Accessed: 29-April-2025 ]}

@online{reference.wolfram_2025_thuemorse, organization={Wolfram Research}, title={ThueMorse}, year={2015}, url={https://reference.wolfram.com/language/ref/ThueMorse.html}, note=[Accessed: 29-April-2025 ]}