A105500 Trajectory of 1 under the morphism 1->{1,2}, 2->{3,2}, 3->{3,4}, 4->{1,4}.
1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 1, 4, 3, 4, 3, 2, 3, 4, 1, 4, 1, 2, 1, 4, 3, 4, 1, 4, 3, 4, 3, 2, 3, 4, 1, 4, 1, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 4, 3, 4, 1, 4, 1, 2, 1, 4, 3, 4, 1, 4, 3, 4, 3, 2, 3, 4, 1, 4, 1, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 4, 1, 2, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 2, 1, 4, 3, 4, 1, 4, 1, 2, 1, 4, 1
Offset: 0
Keywords
Links
- Joerg Arndt, Iterate six of the Harter-Heighway dragon
- F. M. Dekking, Recurrent sets, Advances in Mathematics, vol. 44, no. 1 (1982), 78-104; page 89, section 4.5.
- Index entries for sequences that are fixed points of mappings
Programs
-
Mathematica
Flatten[ Nest[ Flatten[ # /. {1 -> {1, 2}, 2 -> {3, 2}, 3 -> {3, 4}, 4 -> {1, 4}} &], {1}, 7]]
-
Python
def A105500(n): return ((n^(n>>1)).bit_count()&3)+1 # Chai Wah Wu, Jul 13 2024
Formula
a(n) = A246960(n) + 1. - Joerg Arndt, Jun 03 2021
Comments