gives the n term in the Thue–Morse sequence.
- 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 is the beginning of the Thue–Morse sequence.
- ThueMorse automatically threads over lists.
Examplesopen allclose all
Basic Examples (2)
The fifth element of the Thue–Morse 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:
ThueMorse threads over lists:
Evaluate at large integers:
Properties & Relations (8)
ThueMorse[n] is 1 if and only if n has an odd number of 1s in its binary form:
The Thue–Morse sequence can arise from a nested list:
The Thue–Morse sequence can arise from the center column of a cellular automaton:
The Thue–Morse sequence has a closed form as a hypergeometric function:
Solution to a recurrence relation:
The Thue–Morse sequence has a nested structure:
Neat Examples (1)
Paths at different angles based on Thue–Morse sequences:
Introduced in 2015