A098190 The length of the cycle reached for the map x->A098189(x) if started at n.
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, 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, 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
Offset: 1
Keywords
Examples
Starting at n=10, the trajectory is 10->14->18->24->28->28->28 (repeating), so the cycle has length a(10)=1. 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. From _Michael De Vlieger_, Mar 01 2017: (Start) a(746)=3 since the trajectory is 746->750->1312->746 (repeating). 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}. Statistics regarding a(n) for 1<=n<=10^6: Cycle | Least n with | Frequency of cycle length for n <= length | cycle length | 10^4 10^5 10^6 1 1 1337 9756 78784 2 1186 39 147 521 3 746 6 14 17 4 3238 43 127 430 5 34 722 1375 1740 6 2226 231 3285 19368 7 294 707 3782 39384 8 5306 44 1892 21583 9 1806 175 696 2269 14 9902 2 2256 53777 18 14422 0 2013 46218 20 9026 3 5271 67258 29 246 3709 35454 239197 32 11802 0 1342 8321 47 19554 0 1838 109448 53 46 2982 30752 311685 (End)
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..5000
Programs
-
Mathematica
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 *) 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 *)
Extensions
Edited by R. J. Mathar, Mar 02 2009
Comments