[go: up one dir, main page]

login
A376562
Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.
30
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, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,4
COMMENTS
Non-perfect-powers (A007916) are numbers without a proper integer root.
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, ...
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
The version for A000002 is A376604, first differences of A054354.
For first differences we had A375706, ones A375740, complement A375714.
Positions of zeros are A376588, complement A376589.
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
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers, complement A001597.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
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).
Sequence in context: A186230 A214304 A248640 * A281083 A230629 A027359
KEYWORD
sign
AUTHOR
Gus Wiseman, Oct 01 2024
STATUS
approved