Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Oct 02 2024 11:36:48
%S 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,
%T 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,
%U 0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.
%C Non-perfect-powers (A007916) are numbers without a proper integer root.
%e The non-perfect powers (A007916) are:
%e 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
%e with first differences (A375706):
%e 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, ...
%e with first differences (A376562):
%e 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, ...
%t radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
%t Differences[Select[Range[100],radQ],2]
%o (Python)
%o from itertools import count
%o from sympy import mobius, integer_nthroot, perfect_power
%o def A376562(n):
%o def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
%o m, k = n, f(n)
%o while m != k: m, k = k, f(k)
%o r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
%o return next(i for i in count(1-k) if not perfect_power(r+i)) # _Chai Wah Wu_, Oct 02 2024
%Y The version for A000002 is A376604, first differences of A054354.
%Y For first differences we had A375706, ones A375740, complement A375714.
%Y Positions of zeros are A376588, complement A376589.
%Y Runs of non-perfect-powers:
%Y - length: A375702 = A053289(n+1) - 1
%Y - first: A375703 (same as A216765 with 2 exceptions)
%Y - last: A375704 (same as A045542 with 8 removed)
%Y - sum: A375705
%Y A000961 lists prime-powers inclusive, exclusive A246655.
%Y A007916 lists non-perfect-powers, complement A001597.
%Y A112344 counts integer partitions into perfect-powers, factorizations A294068.
%Y A333254 gives run-lengths of differences between consecutive primes.
%Y For non-perfect-powers: A375706 (first differences), A376588 (inflections and undulations), A376589 (nonzero curvature).
%Y For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).
%Y Cf. A025475, A052410, A053707, A064113, A069623, A093555, A174965, A182853, A336416, A336417, A361102.
%K sign
%O 1,4
%A _Gus Wiseman_, Oct 01 2024