cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A105500 Trajectory of 1 under the morphism 1->{1,2}, 2->{3,2}, 3->{3,4}, 4->{1,4}.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, May 02 2005

Keywords

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).

Crossrefs

Cf. A246960 (as 0..3).
Indices of terms 1..4: A043724, A043725, A043726, A043727.

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