Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 Jul 13 2024 17:51:35
%S 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,
%T 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,
%U 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
%N Trajectory of 1 under the morphism 1->{1,2}, 2->{3,2}, 3->{3,4}, 4->{1,4}.
%C 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
%C 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).
%H Joerg Arndt, <a href="/A105500/a105500.pdf">Iterate six of the Harter-Heighway dragon</a>
%H F. M. Dekking, <a href="http://dx.doi.org/10.1016/0001-8708(82)90066-4">Recurrent sets</a>, Advances in Mathematics, vol. 44, no. 1 (1982), 78-104; page 89, section 4.5.
%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%F a(n) = A246960(n) + 1. - _Joerg Arndt_, Jun 03 2021
%t Flatten[ Nest[ Flatten[ # /. {1 -> {1, 2}, 2 -> {3, 2}, 3 -> {3, 4}, 4 -> {1, 4}} &], {1}, 7]]
%o (Python)
%o def A105500(n): return ((n^(n>>1)).bit_count()&3)+1 # _Chai Wah Wu_, Jul 13 2024
%Y Cf. A246960 (as 0..3).
%Y Indices of terms 1..4: A043724, A043725, A043726, A043727.
%K nonn
%O 0,2
%A _Roger L. Bagula_, May 02 2005