ThueMorse

ThueMorse[n]

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)

The fifth element of the ThueMorse sequence:

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

The first 10 elements of the sequence:

Display the values alongside the binary expansion:

Scope  (2)

ThueMorse threads over lists:

Evaluate at large integers:

Applications  (1)

The Koch snowflake:

Properties & Relations  (8)

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

The ThueMorse sequence can arise from a nested list:

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

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

Solution to a recurrence relation:

Cube-free sequence:

Overlap-free sequence:

The ThueMorse sequence has a nested structure:

Neat Examples  (1)

Paths at different angles based on ThueMorse sequences:

Introduced in 2015
 (10.2)