OFFSET
1,2
COMMENTS
Non-perfect-powers (A007916) are numbers without a proper integer root.
EXAMPLE
The 5th non-perfect-power is 7, and the 6th is 10, so a(5) = 3.
MATHEMATICA
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Differences[Select[Range[100], radQ]]
PROG
(Python)
from itertools import count
from sympy import mobius, integer_nthroot, perfect_power
def A375706(n):
def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m, k = n, f(n)
while m != k: m, k = k, f(k)
return next(i for i in count(m+1) if not perfect_power(i))-m # Chai Wah Wu, Sep 09 2024
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 31 2024
STATUS
approved