login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A375267
Number of iterations of the A375265 map to reach 1 starting from n, or -1 if 1 is never reached.
5
0, 1, 1, 2, 5, 2, 16, 3, 2, 6, 14, 3, 9, 17, 6, 4, 12, 3, 20, 7, 17, 15, 15, 4, 23, 10, 3, 18, 18, 7, 106, 5, 15, 13, 13, 4, 21, 21, 10, 8, 109, 18, 29, 16, 7, 16, 104, 5, 24, 24, 13, 11, 11, 4, 112, 19, 21, 19, 32, 8, 19, 107, 18, 6, 27, 16, 27, 14, 16, 14, 102
OFFSET
1,4
EXAMPLE
a(10) = 6 because the trajectory 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 consists of 6 steps.
MATHEMATICA
A375265[n_] := Which[Divisible[n, 3], n/3, Divisible[n, 2], n/2, True, 3*n + 1];
Array[Length[NestWhileList[A375265, #, # > 1 &]] - 1 &, 100]
CROSSREFS
(Row lengths of A375266) - 1.
Sequence in context: A098886 A286785 A340043 * A257514 A089120 A286452
KEYWORD
nonn,easy
AUTHOR
Paolo Xausa, Aug 09 2024
STATUS
approved