This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A098190 #20 Mar 02 2017 23:05:50 %S A098190 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 A098190 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 A098190 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 A098190 The length of the cycle reached for the map x->A098189(x) if started at n. %C A098190 See various attractors in A098191-A098195. %C A098190 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 A098190 From _Michael De Vlieger_, Mar 02 2017: (Start) %C A098190 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 A098190 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 A098190 Maximum number of transient terms for n = 10^m: {0, 5, 52, 53, 89, 235, 502, ...}. %C A098190 (End) %H A098190 Michael De Vlieger, <a href="/A098190/b098190.txt">Table of n, a(n) for n = 1..5000</a> %e A098190 Starting at n=10, the trajectory is 10->14->18->24->28->28->28 (repeating), so the cycle has length a(10)=1. %e A098190 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 A098190 From _Michael De Vlieger_, Mar 01 2017: (Start) %e A098190 a(746)=3 since the trajectory is 746->750->1312->746 (repeating). %e A098190 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 A098190 Statistics regarding a(n) for 1<=n<=10^6: %e A098190 Cycle | Least n with | Frequency of cycle length for n <= %e A098190 length | cycle length | 10^4 10^5 10^6 %e A098190 1 1 1337 9756 78784 %e A098190 2 1186 39 147 521 %e A098190 3 746 6 14 17 %e A098190 4 3238 43 127 430 %e A098190 5 34 722 1375 1740 %e A098190 6 2226 231 3285 19368 %e A098190 7 294 707 3782 39384 %e A098190 8 5306 44 1892 21583 %e A098190 9 1806 175 696 2269 %e A098190 14 9902 2 2256 53777 %e A098190 18 14422 0 2013 46218 %e A098190 20 9026 3 5271 67258 %e A098190 29 246 3709 35454 239197 %e A098190 32 11802 0 1342 8321 %e A098190 47 19554 0 1838 109448 %e A098190 53 46 2982 30752 311685 %e A098190 (End) %t A098190 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 A098190 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 A098190 Cf. A034448, A000010, A063919, A098189-A098195. %K A098190 nonn %O A098190 1,34 %A A098190 _Labos Elemer_, Sep 03 2004 %E A098190 Edited by _R. J. Mathar_, Mar 02 2009