%I #25 Apr 27 2020 17:34:14
%S 2,2222121,22,22221,22221212,2222122212212121,222,2222122212212121221,
%T 222212,22221222122121,222212122,222212221,22221222122121212,
%U 22221222221212121,2222,222212221221,22221222122121212212,22221222122121222121,2222122,2222221,222212221221212
%N "Wondrous representation" [left to right] of positive integer n, n >= 2.
%C Start with k = 1; left to right "digits": 2 means k <= 2k, 1 means k <= (k-1)/3. (1 has the empty "wondrous representation," since it is "wondrous" by definition ... although, for a nonempty representation, we could [in a kludgy way] represent 1 using the trivial cycle: 221.)
%C "Wondrous numbers" (Hofstadter, 1979, pp. 400-401) are positive integers with a Collatz trajectory that eventually reaches 1.
%C According to the Collatz conjecture, every positive integer is "wondrous" (none is "unwondrous"). Thus, every positive integer n >= 2 is conjectured to have a "wondrous representation," which is then unique.
%C Reading the "digits" right to left gives the Collatz trajectory of n, n >= 2. Start with n; right to left "digits": 2 means k <= k/2, 1 means k <= 3k+1.
%C For a representation to be well-formed, we can only append a "digit" 1 if the number reached to the left is congruent to 4 (mod 6), yielding an odd number after appending 1. We can append "digit" 2 without any restriction. Thus a(n) is odd iff it ends with 1.
%D Douglas R. Hofstadter, "Gödel, Escher, Bach: an Eternal Golden Braid." New York: Basic Books, 1979.
%H Andrew Howroyd, <a href="/A303255/b303255.txt">Table of n, a(n) for n = 2..1000</a>
%e a(3) = 2222121: [left to right] (1) => 2 => 4 => 8 => 16 => 5 => 10 => 3.
%o (PARI) a(n)={my(L=List()); while(n<>1, listput(L, 2-n%2); n=if(n%2, n*3+1, n/2)); fromdigits(Vecrev(L))} \\ _Andrew Howroyd_, Apr 27 2020
%Y "Wondrous representation" [right to left]: A303433.
%K nonn
%O 2,1
%A _Daniel Forgues_, Apr 24 2018
%E Terms a(18) and beyond from _Andrew Howroyd_, Apr 27 2020