OFFSET
1,1
COMMENTS
Includes all the squares of primes (A001248).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
f[p_, e_] := (p^(e + 1) - 1)/(p - 1) - 1; s[1] = 0; s[n_] := Times @@ f @@@ FactorInteger[n] - n; seq[max_] := Module[{v = w = Table[0, {max}], i}, Do[i = s[k]; If[1 <= i <= max, v[[i]]++; w[[i]] = k], {k, 1, max^2}]; w[[Position[v, 1] // Flatten]]]; seq[200]
PROG
(PARI) s(n) = {my(f = factor(n)); prod(i = 1, #f~, (f[i, 1]^(f[i, 2] + 1) - 1)/(f[i, 1] -1) - 1) - n; }
lista(nmax) = {my(v = w = vector(nmax), i); for(k = 1, nmax^2, i = s(k); if(i > 0 && i <= nmax, v[i]++; w[i] = k)); for(k = 1, nmax, if(v[k] == 1, print1(w[k], ", "))); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, May 12 2024
STATUS
approved