login
A105500
Trajectory of 1 under the morphism 1->{1,2}, 2->{3,2}, 3->{3,4}, 4->{1,4}.
5
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,2
COMMENTS
Harter-Heighway dragon when interpreting 1, 2, 3, and 4 respectively as unit edge to right, up, left, and down. - Joerg Arndt, Jun 03 2021
The characteristic polynomial of the transition matrix is x^4-4*x^3+6*x^2-4*x = x*(x-2)*(x^2 - 2*x + 2).
LINKS
F. M. Dekking, Recurrent sets, Advances in Mathematics, vol. 44, no. 1 (1982), 78-104; page 89, section 4.5.
FORMULA
a(n) = A246960(n) + 1. - Joerg Arndt, Jun 03 2021
MATHEMATICA
Flatten[ Nest[ Flatten[ # /. {1 -> {1, 2}, 2 -> {3, 2}, 3 -> {3, 4}, 4 -> {1, 4}} &], {1}, 7]]
PROG
(Python)
def A105500(n): return ((n^(n>>1)).bit_count()&3)+1 # Chai Wah Wu, Jul 13 2024
CROSSREFS
Cf. A246960 (as 0..3).
Indices of terms 1..4: A043724, A043725, A043726, A043727.
Sequence in context: A106383 A175794 A324389 * A288569 A088748 A323235
KEYWORD
nonn
AUTHOR
Roger L. Bagula, May 02 2005
STATUS
approved