|
|
A375708
|
|
First differences of non-prime-powers (exclusive, so 1 is not a prime-power).
|
|
3
|
|
|
5, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Non-prime-powers (exclusive) are listed by A361102.
Warning: For this sequence, 1 is not a prime-power but is a non-prime-power.
|
|
LINKS
|
|
|
EXAMPLE
|
The 6th non-prime-power (exclusive) is 15, and the 7th is 18, so a(6) = 3.
|
|
MATHEMATICA
|
Differences[Select[Range[100], !PrimePowerQ[#]&]]
|
|
PROG
|
(Python)
from itertools import count
from sympy import primepi, integer_nthroot, primefactors
def f(x): return int(n+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 09 2024
|
|
CROSSREFS
|
If 1 is considered a prime power we have A375735.
Runs of non-prime-powers:
|
|
KEYWORD
|
nonn,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|