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).
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, 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, 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
Offset: 1
Keywords
Examples
Because A034460(6) = 6, a(6) = 1. Because A034460(30) = 42, A034460(42) = 54, A034460(54) = 30, a(30) = a(42) = a(54) = 3. 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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
- Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
Crossrefs
Programs
-
Mathematica
a034460[0] = 0; (* avoids dividing by 0 when an iteration reaches 0 *) a034460[n_] := Total[Select[Divisors[n], GCD[#, n/#] == 1 &]] - n /; n > 0 cycleL[k_] := Module[{nL=NestWhileList[a034460, k, UnsameQ, All]}, If[k==Last[nL], Length[nL]-1, 0]] a327159[n_] := Map[cycleL, Range[n]] a327159[120] (* Hartmut F. W. Hoft, Feb 04 2024 *)
-
PARI
A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460 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)));