OFFSET
1,2
COMMENTS
There exists a subset E = { 1, 2, 3, 4, 5, 8, 10, 16, 21, 32, 42, 64, 85, 128, 170, 227, 256, 341, 512, 682, 1024, 2048, ...} in {a(n)} such that each element m of E generates the Collatz sequence of iterates m -> T_1(m) -> T_2(m) -> T_3(m) -> ... -> 1 where any T_i(m) is an element of E of the form [2^i /3^j] where i = A006666(m), or A006666(m)-1, or ... and j = A006667(m), or A006667(m)-1, or ..., but with A006667(m) <= 3. If m is even then m/2 is in E.
For example, the statement that "3 is an element of E" implies that each element of the trajectory 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 belongs to E. Thus the trajectory of the number 3 can be represented by [2^5/3^2] -> [2^5/3^1] -> [2^4/3^1] -> [2^4/3^0] -> [2^3/3^0] -> [2^2/3^0] -> [2^1/3^0] -> [2^0/3^0].
LINKS
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 70; t = {}; n = 0; While[Length[t] < nn, n++; c = Collatz[n]; ev = Length[Select[c, EvenQ]]; od = Length[c] - ev - 1; AppendTo[t, Floor[2^ev/3^od]]]; t
PROG
(PARI) a(n) = my(t, h); while(n>1, if(n%2, n=3*n+1; t++, n>>=1; h++)); 2^h\3^t; \\ Michel Marcus, May 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Apr 03 2018
STATUS
approved