%I #15 Sep 16 2024 08:39:37
%S 4,2,2,1,3,2,1,1,2,2,2,2,3,1,1,1,2,1,1,2,2,1,1,2,2,1,1,2,1,1,1,1,2,2,
%T 1,2,1,2,1,1,2,2,1,1,1,1,2,2,2,1,1,1,1,2,1,1,1,1,1,1,2,1,1,2,2,1,1,2,
%U 2,1,1,2,1,1,1,1,1,1,2,1,1,2,3,1,2,1,1
%N First differences of non-prime-powers (inclusive).
%C Inclusive means 1 is a prime-power but not a non-prime-power.
%C Non-prime-powers (inclusive) are listed by A024619.
%e The 5th non-prime-power (inclusive) is 15, and the 6th is 18, so a(5) = 3.
%t Differences[Select[Range[2,100],!PrimePowerQ[#]&]]
%o (Python)
%o from itertools import count
%o from sympy import primepi, integer_nthroot, primefactors
%o def A375735(n):
%o def f(x): return int(n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
%o m, k = n, f(n)
%o while m != k: m, k = k, f(k)
%o return next(i for i in count(m+1) if len(primefactors(i))>1)-m # _Chai Wah Wu_, Sep 10 2024
%Y For perfect powers (A001597) we have the latter terms of A053289.
%Y For nonprime numbers (A002808) we have the latter terms of A073783.
%Y For squarefree numbers (A005117) we have the latter terms of A076259.
%Y First differences of A024619.
%Y For prime-powers (A246655) we have the latter terms of A057820.
%Y Essentially the same as the exclusive version, A375708.
%Y Positions of 1's are A375713(n) - 1.
%Y For runs of non-prime-powers:
%Y - length: A110969
%Y - first: A373676
%Y - last: A373677
%Y - sum: A373678
%Y A000040 lists all of the primes, first differences A001223.
%Y A000961 lists prime-powers (inclusive).
%Y A007916 lists non-perfect-powers, first differences A375706.
%Y A013929 lists the nonsquarefree numbers, first differences A078147.
%Y A246655 lists prime-powers (exclusive).
%Y Prime-power runs: A373675, min A373673, max A373674, length A174965.
%Y Prime-power anti-runs: A373576, min A120430, max A006549, length A373671.
%Y Non-prime-power anti-runs: A373679, min A373575, max A255346, len A373672.
%Y Cf. A046933, A061399, A093555, A176246, A251092, A323054, A375709, A375736.
%K nonn
%O 1,1
%A _Gus Wiseman_, Sep 04 2024