OFFSET
1,4
COMMENTS
Non-perfect-powers (A007916) are numbers without a proper integer root.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
From Robert Israel, Aug 17 2026: (Start)
Mihailescu's theorem implies that the only case where two consecutive non-perfect powers have difference > 2 is A375706(5) = 3. It is conjectured that the only case where A375706 has two consecutive 2's is A375706(19) = A375706(20) = 2. If this is the case, the nonzero terms of this sequence for n > 20 all fit the pattern of a 1 followed immediately by a -1. (End)
EXAMPLE
The non-perfect powers (A007916) are:
2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
with first differences (A375706):
1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, ...
with first differences (A376562):
1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, ...
MAPLE
filter:= n -> igcd(op(ifactors(n)[2][.., 2])) = 1:
A7916:= select(filter, [$2..200]):
A7916[1..-3]-2*A7916[2..-2] + A7916[3..-1]; # Robert Israel, Aug 16 2026
MATHEMATICA
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Differences[Select[Range[100], radQ], 2]
PROG
(Python)
from itertools import count
from sympy import mobius, integer_nthroot, perfect_power
def A376562(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)
r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
return next(i for i in count(1-k) if not perfect_power(r+i)) # Chai Wah Wu, Oct 02 2024
CROSSREFS
Runs of non-perfect-powers:
- sum: A375705
A333254 gives run-lengths of differences between consecutive primes.
For non-perfect-powers: A375706 (first differences), A376588 (inflections and undulations), A376589 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).
KEYWORD
sign
AUTHOR
Gus Wiseman, Oct 01 2024
STATUS
approved