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”).
%I #20 May 16 2020 03:36:40
%S 0,2,1,7,3,6,2,5,4,4,3,12,3,11,4,10,13,10,4,9,5,8,5,8,14,7,6,32,6,32,
%T 6,31,7,30,7,29,33,29,8,28,8,28,8,27,9,26,9,12,9,11,10,25,10,25,10,24,
%U 10,23,11,23,10,22,12,21,24,21,12,21,13
%N Number of steps needed to reach zero or a cycle when starting from k = n and repeatedly applying the map that replaces k by k - d(k) if k is even, by k + d(k) if k is odd, where d(k) is the number of divisors of k (A000005).
%C First cycle we see for n = 83. The length of the cycle is 38 steps. To reach a cycle means the time to first step into the loop.
%e n = 1, mapping steps are 1 + 1 = 2, 2 - 2 = 0, a(1) = 2;
%e n = 2, mapping steps are 2 - 2 = 0, a(2) = 1;
%e n = 3, mapping steps are 3 + 2 = 5, 5 + 2 = 7, 7 + 2 = 9, 9 + 3 = 12, 12 - 6 = 6, 6 - 4 = 2, 2 - 2 = 0, a(3) = 7;
%e n = 4, mapping steps are 4 - 3 = 1, 1 + 1 = 2, 2 - 2 = 0, a(4) = 3;
%e n = 5, mapping steps are 5 + 2 = 7, 7 + 2 = 9, 9 + 3 = 12, 12 - 6 = 6, 6 - 4 = 2, 2 - 2 = 0, a(5) = 6.
%Y Cf. A000005, A155043, A261085, A261088.
%Y Cf. A049820, A062249.
%K nonn
%O 0,2
%A _Ctibor O. Zizka_, Apr 29 2020