OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Herman J. J. te Riele, Unitary Aliquot Sequences, MR 139/72, Mathematisch Centrum, Amsterdam, 1972.
Herman J. J. te Riele, Further Results on Unitary Aliquot Sequences, NW 2/73, Mathematisch Centrum, Amsterdam, 1973.
EXAMPLE
a(5) = 15 because the fifth integer that is neither prime nor a prime power and whose unitary aliquot sequence terminates in 0 is 15.
MATHEMATICA
UnitaryDivisors[n_Integer?Positive] := Select[Divisors[n], GCD[ #, n/# ] == 1 \ &]; sstar[n_] := Plus @@ UnitaryDivisors[ n] - n; pp[k_] := If[Length[ FactorInteger[k]] == 1, True, False]; g[n_] := If[n > 0, sstar[n], 0]; UnitaryTrajectory[n_] := Most[NestWhileList[g, n, UnsameQ, All]]; Select[Range[100], Last[UnitaryTrajectory[ # ]] == 0 && ! pp[ # ] &]
s[n_] := Times @@ (1 + Power @@@ FactorInteger[n]) - n; s[0] = s[1] = 0; q[n_] := If[PrimeNu[n] == 1, False, Module[{v = NestWhileList[s, n, UnsameQ, All]}, v[[-1]] == 0]]; Select[Range[120], q] (* Amiram Eldar, Mar 11 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ant King, Jan 24 2007
EXTENSIONS
More terms from Amiram Eldar, Mar 11 2023
STATUS
approved