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

The length of the cycle reached for the map x->A098189(x) if started at n.
6

%I #20 Mar 02 2017 23:05:50

%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,

%T 1,5,1,5,1,5,1,5,1,5,5,53,1,53,1,53,5,53,1,53,1,53,5,53,1,5,1,53,5,1,

%U 5,53,1,53,53,5,1,53,1,5,1,1,5,5,1,5,1,53,1,5,5,53,1,53,1,53,5,1,53,5,53,53

%N The length of the cycle reached for the map x->A098189(x) if started at n.

%C See various attractors in A098191-A098195.

%C For n below 10^6, cycle-lengths are one of {1,2,3,4,5,6,7,8,9,14,18,20,29,32,47,53}.

%C From _Michael De Vlieger_, Mar 02 2017: (Start)

%C Corresponding number of transient terms: {0, 0, 1, 2, 1, 5, 1, 2, 3, 4, 1, 5, 1, 3, 5, 4, 1, 2, 1, 6, 7, 5, 1, 1, 6, 4, 5, 0, 1, 3, 1, 2, 1, 19, 2, 19, 1, 18, 3, 19, 1, 17, 1, 20, 20, 49, 1, 51, 3, 48, 20, 50, 1, 46, 3, 52, 21, 47, 1, 13, 1, 46, 21, 2, 20, 45, 1, 48, 51, 24, 1, 46, 1, 12, 3, 3, 20, 11, 1, 25, 1, 44, 1, 16, 21, 43, 3, 49, 1, 42, 20, 4, 49, 15, 52, 44, ...}.

%C Maximum number of transient terms for n = 2^m: {0, 0, 2, 5, 5, 7, 52, 53, 53, 53, 53, 68, 73, 89, 164, 197, 213, 241, 372, 422, ...}.

%C Maximum number of transient terms for n = 10^m: {0, 5, 52, 53, 89, 235, 502, ...}.

%C (End)

%H Michael De Vlieger, <a href="/A098190/b098190.txt">Table of n, a(n) for n = 1..5000</a>

%e Starting at n=10, the trajectory is 10->14->18->24->28->28->28 (repeating), so the cycle has length a(10)=1.

%e Starting at n=246, the trajectory is 246->424->278..->6008->[3768->4440->...,10264,6428,...->2206->2210->3768], where the cycle of length a(246)=29 has been put into brackets.

%e From _Michael De Vlieger_, Mar 01 2017: (Start)

%e a(746)=3 since the trajectory is 746->750->1312->746 (repeating).

%e a(3238)=4 since the trajectory begins with transient terms {3238, 3242, 3246, 5424, 5960, 5732, 4306, 4310, 6056, 3798, 5100}, followed by the cycle {8080, 7204, 5410, 7596}.

%e Statistics regarding a(n) for 1<=n<=10^6:

%e Cycle | Least n with | Frequency of cycle length for n <=

%e length | cycle length | 10^4 10^5 10^6

%e 1 1 1337 9756 78784

%e 2 1186 39 147 521

%e 3 746 6 14 17

%e 4 3238 43 127 430

%e 5 34 722 1375 1740

%e 6 2226 231 3285 19368

%e 7 294 707 3782 39384

%e 8 5306 44 1892 21583

%e 9 1806 175 696 2269

%e 14 9902 2 2256 53777

%e 18 14422 0 2013 46218

%e 20 9026 3 5271 67258

%e 29 246 3709 35454 239197

%e 32 11802 0 1342 8321

%e 47 19554 0 1838 109448

%e 53 46 2982 30752 311685

%e (End)

%t Last /@ Table[If[n == 1, {0, 1}, Function[s, Function[t, {#, First@ Differences@ Take[Flatten@ t[[# + 1]], 2]} &@ Count[DeleteDuplicates@ t, k_ /; Length@ k == 1]]@ Map[Position[s, #] &, s]]@ NestList[Function[n, DivisorSum[n, # &, CoprimeQ[#, n/#] &] - EulerPhi@ n],n, n + 120]], {n, 96}] (* or, faster *)

%t f[n_] := Module[{s = {n}, k, g}, g[x_] := DivisorSum[x, # &, CoprimeQ[#, x/#] &] - EulerPhi@ x; k = g@ n; While[Count[s, k] <= 1, AppendTo[s, k]; k = g@ Last@ s]; s]; Table[If[n == 1, {0, 1}, Function[s, Function[t, {#, First@ Differences@ Take[Flatten@ t[[# + 1]], 2]} &@ Count[DeleteDuplicates@ t, k_ /; Length@ k == 1]]@ Map[Position[s, #] &, s]]@ f@ n], {n, 96}] (* _Michael De Vlieger_, Mar 01 2017 *)

%Y Cf. A034448, A000010, A063919, A098189-A098195.

%K nonn

%O 1,34

%A _Labos Elemer_, Sep 03 2004

%E Edited by _R. J. Mathar_, Mar 02 2009