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 A327159 #18 Feb 04 2024 18:27:01 %S A327159 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0, %T A327159 0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0, %U A327159 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0 %N A327159 Size of the cycle containing n in the map x -> usigma(x)-x or 0 if n is not a member of any finite cycle. Here usigma is the sum of unitary divisors of n (A034448). %H A327159 Antti Karttunen, <a href="/A327159/b327159.txt">Table of n, a(n) for n = 1..20000</a> %H A327159 Antti Karttunen, <a href="/A327159/a327159.txt">Data supplement: n, a(n) computed for n = 1..100000</a> %e A327159 Because A034460(6) = 6, a(6) = 1. %e A327159 Because A034460(30) = 42, A034460(42) = 54, A034460(54) = 30, a(30) = a(42) = a(54) = 3. %e A327159 Because A034460(90) = 90, a(90) = 1. Because A034460(78) = 90, a(78) = 0, as even though 78 ends into a cycle of one, it itself is not a part of that cycle. %t A327159 a034460[0] = 0; (* avoids dividing by 0 when an iteration reaches 0 *) %t A327159 a034460[n_] := Total[Select[Divisors[n], GCD[#, n/#] == 1 &]] - n /; n > 0 %t A327159 cycleL[k_] := Module[{nL=NestWhileList[a034460, k, UnsameQ, All]}, If[k==Last[nL], Length[nL]-1, 0]] %t A327159 a327159[n_] := Map[cycleL, Range[n]] %t A327159 a327159[120] (* _Hartmut F. W. Hoft_, Feb 04 2024 *) %o A327159 (PARI) %o A327159 A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460 %o A327159 A327159(n,orgn=n,xs=Set([])) = if(1==n,0,if(vecsearch(xs,n), if(n==orgn,length(xs),0), xs = setunion([n],xs); A327159(A034460(n),orgn,xs))); %Y A327159 Cf. A002827 (positions of ones), A063991 (of 2's), A319902 (of 4's), A097024 (of 5's), A319917 (of 6's), A319937 (of 10's), A097030 (of 14's), A327157 (of all nonzero terms). %Y A327159 Cf. also A034448, A034460, A097031, A318880, A318882, A327162. %K A327159 nonn %O A327159 1,30 %A A327159 _Antti Karttunen_, Aug 28 2019