[go: up one dir, main page]

login
A375706
First differences of non-perfect-powers.
44
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, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
OFFSET
1,2
COMMENTS
Non-perfect-powers (A007916) are numbers without a proper integer root.
FORMULA
a(n) = A007916(n) - A007916(n-1).
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
CROSSREFS
For prime-powers (A000961) we have A057820.
For perfect powers (A001597) we have A053289.
For nonprime numbers (A002808) we have A073783.
For squarefree numbers (A005117) we have A076259.
First differences of A007916.
For nonsquarefree numbers (A013929) we have A078147.
For non-prime-powers (A024619) we have A375708.
Positions of 1s are A375740, complement A375714.
Runs of non-perfect-powers:
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (same as A045542 with 8 removed)
- sum: A375705
Sequence in context: A202241 A248156 A352780 * A331368 A106177 A211985
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 31 2024
STATUS
approved