OFFSET
1,2
COMMENTS
Non-perfect-powers (A007916) are numbers without a proper integer root.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
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
(PARI)
up_to = 112;
A375706list(up_to) = { my(v=vector(up_to), pk=2, k=2, i=0); while(i<#v, k++; if(!ispower(k), i++; v[i] = k-pk; pk = k)); (v); };
v375706 = A375706list(up_to);
A375706(n) = v375706[n]; \\ Antti Karttunen, Jan 19 2025
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 31 2024
EXTENSIONS
More terms from Antti Karttunen, Jan 19 2025
STATUS
approved