OFFSET
1,2
COMMENTS
LINKS
MATHEMATICA
Table[FromDigits[#, 2] &@ Boole@ OddQ@ Reverse@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], {n, 33}] (* Michael De Vlieger, Aug 19 2017 *)
PROG
(PARI) a(n) = my (v=0, p=1); while (n>1, if (n%2, n = 3*n+1; v += p, n = n/2); p *= 2); return (p+v) \\ Rémy Sigrist, Aug 19 2017
CROSSREFS
KEYWORD
AUTHOR
T. D. Noe, Jan 17 2013
STATUS
approved