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”).

A259846
Number of steps to get from n to 1 by process of replacing with sum of divisors if the result is odd, or dividing by 2 if even.
0
0, 1, 3, 2, 5, 4, 4, 3, 7, 6, 6, 5, 6, 5, 7, 4, 9, 8, 8, 7, 6, 7, 7, 6, 7, 7, 9, 6, 9, 8, 6, 5, 8, 10, 8, 9, 10, 9, 8, 8, 8, 7, 9, 8, 10, 8, 8, 7, 11, 8, 11, 8, 11, 10, 11, 7, 10, 10, 10, 9, 8, 7, 10, 6, 9, 9, 12, 11, 9, 9, 11, 10, 12, 11, 9, 10, 9, 9, 10, 9
OFFSET
1,3
EXAMPLE
a(9)= 7 because 9 -> sigma(9)= 13 -> sigma(13)= 14 -> 7 -> sigma(7)= 8 -> 4 -> 2 -> 1, hence the trajectory {9 -> 13 -> 14 -> 7 -> 8 -> 4 -> 2 -> 1} with 7 iterations.
MATHEMATICA
f[n_]:=Module[{a=n, k=0}, While[a!=1, k++; If[EvenQ[a], a=a/2, a=DivisorSigma[1, a]]]; k]; Table[f[n], {n, 1, 150}]
CROSSREFS
Cf. A000203.
Sequence in context: A140061 A292776 A061313 * A087669 A053087 A316519
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Jul 07 2015
STATUS
approved