OFFSET
1,2
EXAMPLE
8 is a perfect power, as 8=2^3, and it is also a refactorable numbers, being divisible by its number of divisors (4).
MATHEMATICA
Join[{1}, Select[Range[10^5], Divisible[#, DivisorSigma[0, #]]&&GCD@@FactorInteger[#][[All, 2]]>1&]]
PROG
(PARI) ok(n) = n==1 || (n%numdiv(n)==0&&ispower(n))
(Python)
from itertools import count, islice
from math import prod
from sympy import mobius, integer_nthroot, factorint
def A376120_gen(): # generator of terms
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return int(x-1+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m = 1
for n in count(1):
m = bisection(lambda x:f(x)+n, m, m)
if not m%prod(e+1 for e in factorint(m).values()): yield m
CROSSREFS
KEYWORD
nonn
AUTHOR
Waldemar Puszkarz, Sep 11 2024
STATUS
approved