login
A375735
First differences of non-prime-powers (inclusive).
13
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, 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, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1
OFFSET
1,1
COMMENTS
Inclusive means 1 is a prime-power but not a non-prime-power.
Non-prime-powers (inclusive) are listed by A024619.
EXAMPLE
The 5th non-prime-power (inclusive) is 15, and the 6th is 18, so a(5) = 3.
MATHEMATICA
Differences[Select[Range[2, 100], !PrimePowerQ[#]&]]
PROG
(Python)
from itertools import count
from sympy import primepi, integer_nthroot, primefactors
def A375735(n):
def f(x): return int(n+1+sum(primepi(integer_nthroot(x, k)[0]) for k in range(1, 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 len(primefactors(i))>1)-m # Chai Wah Wu, Sep 10 2024
CROSSREFS
For perfect powers (A001597) we have the latter terms of A053289.
For nonprime numbers (A002808) we have the latter terms of A073783.
For squarefree numbers (A005117) we have the latter terms of A076259.
First differences of A024619.
For prime-powers (A246655) we have the latter terms of A057820.
Essentially the same as the exclusive version, A375708.
Positions of 1's are A375713(n) - 1.
For runs of non-prime-powers:
- length: A110969
- first: A373676
- last: A373677
- sum: A373678
A000040 lists all of the primes, first differences A001223.
A000961 lists prime-powers (inclusive).
A007916 lists non-perfect-powers, first differences A375706.
A013929 lists the nonsquarefree numbers, first differences A078147.
A246655 lists prime-powers (exclusive).
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power anti-runs: A373576, min A120430, max A006549, length A373671.
Non-prime-power anti-runs: A373679, min A373575, max A255346, len A373672.
Sequence in context: A123402 A205032 A368203 * A264752 A325527 A088570
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 04 2024
STATUS
approved