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 A127661 #42 Aug 28 2023 08:22:08 %S A127661 2,3,3,3,3,1,3,4,3,5,3,5,3,6,4,3,3,6,3,6,4,7,3,8,3,4,4,6,3,6,3,4,5,7, %T A127661 4,7,3,8,4,8,3,5,3,4,5,5,3,7,3,7,5,7,3,4,4,6,4,5,3,1,3,8,4,5,4,3,3,8, %U A127661 5,10,3,3,3,9,4,9,4,2,3,8,3,5,3,10,4,6,6,8,3,1,5,7,5,8,4,9,3,8,5,7 %N A127661 Lengths of the infinitary aliquot sequences. %C A127661 An infinitary aliquot sequence is defined by the map x->A049417(x)-x. The map usually terminates with a zero, but may enter cycles (if n in A127662 for example). %C A127661 The length of an infinitary aliquot sequence is defined to be the length of its transient part + the length of its terminal cycle. %C A127661 The value of a(840) starting the infinitary aliquot sequence 840 -> 2040 -> 4440 -> 9240 -> 25320,... is >1500. - _R. J. Mathar_, Oct 05 2017 %H A127661 R. J. Mathar, <a href="/A127661/b127661.txt">Table of n, a(n) for n = 1..839</a> %H A127661 Graeme L. Cohen, <a href="http://dx.doi.org/10.1090/S0025-5718-1990-0993927-5">On an integer's infinitary divisors</a>, Math. Comp., 54 (1990), 395-411. %H A127661 Hans Havermann, <a href="/A127661/a127661.png">Graphs of infinitary aliquot sequences for 840, 1152, 2442, 2658, 2982, 5766, 6216, 6870, 7560, 8670, 9030, 9570</a> (click to see full plots) %H A127661 D. Moews, <a href="http://djm.cc/aliquot-database/aliquot-database.uhtml">A database of aliquot cycles</a> (2015) %H A127661 J. O. M. Pedersen, <a href="http://amicable.homepage.dk/tables.htm">Tables of Aliquot Cycles</a> [Broken link] %H A127661 J. O. M. Pedersen, <a href="http://web.archive.org/web/20140502102524/http://amicable.homepage.dk/tables.htm">Tables of Aliquot Cycles</a> [Via Internet Archive Wayback-Machine] %H A127661 J. O. M. Pedersen, <a href="/A063990/a063990.pdf">Tables of Aliquot Cycles</a> [Cached copy, pdf file only] %e A127661 a(4)=3 because the infinitary aliquot sequence generated by 4 is 4 -> 1 -> 0 and it has length 3. %e A127661 a(6) = 1 because 6 -> 6 -> 6 ->... enters a cycle after 1 term. %e A127661 a(8) = 4 because 8 -> 7 -> 1 -> 0 terminates after 4 terms. %e A127661 a(30) = 6 because 30 ->42 -> 54 -> 66 -> 78 -> 90 -> 90 -> 90 -> ...enters a cycle after 6 terms. %e A127661 a(126)=2 because 126 -> 114 -> 126 enters a cycle after 2 terms. %p A127661 # Uses code snippets of A049417 %p A127661 A127661 := proc(n) %p A127661 local trac,x; %p A127661 x := n ; %p A127661 trac := [x] ; %p A127661 while true do %p A127661 x := A049417(x)-trac[-1] ; %p A127661 if x = 0 then %p A127661 return 1+nops(trac) ; %p A127661 elif x in trac then %p A127661 return nops(trac) ; %p A127661 end if; %p A127661 trac := [op(trac),x] ; %p A127661 end do: %p A127661 end proc: %p A127661 seq(A127661(n),n=1..100) ; # _R. J. Mathar_, Oct 05 2017 %t A127661 ExponentList[n_Integer,factors_List]:={#,IntegerExponent[n,# ]}&/@factors;InfinitaryDivisors[1]:={1}; InfinitaryDivisors[n_Integer?Positive]:=Module[ { factors=First/@FactorInteger[n], d=Divisors[n] }, d[[Flatten[Position[ Transpose[ Thread[Function[{f,g}, BitOr[f,g]==g][ #,Last[ # ]]]&/@ Transpose[Last/@ExponentList[ #,factors]&/@d]],_?(And@@#&),{1}]] ]] ]; properinfinitarydivisorsum[k_]:=Plus@@InfinitaryDivisors[k]-k;g[n_] := If[n > 0,properinfinitarydivisorsum[n], 0];iTrajectory[n_] := Most[NestWhileList[g, n, UnsameQ, All]];Length[iTrajectory[ # ]] &/@ Range[100] %t A127661 (* Second program: *) %t A127661 A049417[n_] := If[n == 1, 1, Sort@ Flatten@ Outer[Times, Sequence @@ (FactorInteger[n] /. {p_, m_Integer} :> p^Select[Range[0, m], BitOr[m, #] == m &])]] // Total; %t A127661 A127661[n_] := Module[{trac, x}, x = n; trac = {x}; While[True, x = A049417[x] - trac[[-1]]; If[x == 0, Return[1 + Length[trac]], If[MemberQ[trac, x], Return[Length[trac]]]]; trac = Append[trac, x]]]; %t A127661 Table[A127661[n], {n, 1, 100}] (* _Jean-François Alcover_, Aug 28 2023, after _R. J. Mathar_ *) %Y A127661 Cf. A126168, A127662 - A127667, A293355, A098007. %K A127661 nonn %O A127661 1,1 %A A127661 _Ant King_, Jan 26 2007