login
A125710
In the "3x+1" problem, let 0 denote a halving step and 1 denote an x->3x+1 step. Then a(n) is obtained by writing the sequence of steps needed to reach 1 from 2n+1 and reading it as a decimal number.
5
4, 80, 16, 43280, 305424, 10512, 272, 87056, 2320, 665872, 64, 21520, 4860176, 1676649379371438023024192690344976, 141584, 54056611079304389108412587463696, 38414608, 5136, 1091856, 11358841104
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
Sequence in context: A065930 A018807 A216410 * A204296 A192790 A211152
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Feb 01 2007
EXTENSIONS
Extended by Ray Chandler, Feb 02 2007
STATUS
approved