OFFSET
2,2
COMMENTS
Working from right to left, the sequence of 0's and 1's in a(n) encode, respectively, the sequence of 3x+1 and x/2 steps in the Collatz iteration of n. This is reverse one's complement of Garner's parity vector. Criswell mentions this encoding.
LINKS
T. D. Noe, Table of n, a(n) for n = 2..10000
Evans A. Criswell, The Collatz Problem (3x+1)
Lynn E. Garner, On heights in the Collatz 3n+1 problem, Discrete Math, 55 (1985), 57-64.
EXAMPLE
a(5)=11110 because the Collatz iteration for 5 is a 3x+1 step (0) followed by 4 x/2 steps (four 1's).
MATHEMATICA
encode[n_]:=Module[{m=n, p, lst={}}, While[m>1, p=Mod[m, 2]; AppendTo[lst, 1-p]; If[p==0, m=m/2, m=3m+1]]; FromDigits[Reverse[lst]]]; Table[encode[n], {n, 2, 26}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
T. D. Noe, Apr 30 2010
STATUS
approved