OFFSET
0,1
EXAMPLE
7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, so a(3) is the
decimal equivalent of 1010100100010000, which is 43280.
MATHEMATICA
f[x_] := If[EvenQ[x], x/2, 3x + 1]; g[n_] := FromDigits[Mod[Most[NestWhileList[f, 2n + 1, # > 1 &, {2, 1}]], 2], 2]; Table[g[n], {n, 0, 30}] (* Ray Chandler, Feb 02 2007 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Feb 01 2007
EXTENSIONS
Extended by Ray Chandler, Feb 02 2007
STATUS
approved