OFFSET
1,1
COMMENTS
EXAMPLE
The abundancy indices of the first terms are 21/10 > 72/35 > 45/22 > 105/52 > 465/232 > 651/325 > 945/472 > ... > 2.
MATHEMATICA
f1[p_, e_] := (p^(e + 1) - 1)/(p^(e + 1) - p^e); f2[p_, e_] := (p^(e + 1) - p)/(p^(e + 1) - 1);
(* Returns the abundancy index of n if n is primitive abundant, and 0 otherwise: *)
abIndex[n_] := If[(r = Times @@ f1 @@@ (f = FactorInteger[n])) > 2 && r * Max @@ f2 @@@ f < 2, r, 0]; abIndex[1] = 0;
seq[kmax_] := Module[{s = {}, ab, abm = 3}, Do[If[0 < (ab = abIndex[k]) < abm, abm = ab; AppendTo[s, k]], {k, 1, kmax}]; s]; seq[10^6]
PROG
(PARI) abindex(n) = {my(f = factor(n), r, p, e); r = sigma(f, -1); if(r <= 2, return(0)); if(vecmax(vector(#f~, i, p = f[i, 1]; e = f[i, 2]; (p^(e + 1) - p)/(p^(e + 1) - 1))) * r < 2, r, 0); } \\ Returns the abundancy index of n if n is primitive abundant, and 0 otherwise.
lista(kmax) = {my(ab, abm = 3); for(k = 1, kmax, ab = abindex(k); if(ab > 0 && ab < abm, abm = ab; print1(k, ", "))); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Apr 06 2023
STATUS
approved