login
A376599
Second differences of consecutive non-prime-powers inclusive (A024619). First differences of A375735.
25
-2, 0, -1, 2, -1, -1, 0, 1, 0, 0, 0, 1, -2, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 1, -1, 1, -1, 0, 1, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 0, 0, 1, -1, 0
OFFSET
1,1
COMMENTS
Inclusive means 1 is a prime-power but not a non-prime-power. For the exclusive version, shift left once.
EXAMPLE
The non-prime-powers inclusive (A024619) are:
6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 36, 38, 39, 40, ...
with first differences (A375735):
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, ...
with first differences (A376599):
-2, 0, -1, 2, -1, -1, 0, 1, 0, 0, 0, 1, -2, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, ...
MATHEMATICA
Differences[Select[Range[100], !(#==1||PrimePowerQ[#])&], 2]
PROG
(Python)
from sympy import primepi, integer_nthroot
def A376599(n):
def iterfun(f, n=0):
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m
def f(x): return int(n+1+sum(primepi(integer_nthroot(x, k)[0]) for k in range(1, x.bit_length())))
return (a:=iterfun(f, n))-((b:=iterfun(lambda x:f(x)+1, a))<<1)+iterfun(lambda x:f(x)+2, b) # Chai Wah Wu, Oct 02 2024
CROSSREFS
The version for A000002 is A376604, first differences of A054354.
For first differences we had A375735, ones A375713(n) - 1.
Positions of zeros are A376600, complement A376601.
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers.
A057820 gives first differences of prime-powers inclusive, first appearances A376341, sorted A376340.
A321346/A321378 count integer partitions without prime-powers, factorizations A322452.
For non-prime-powers: A024619/A361102 (terms), A375735/A375708 (first differences), A376600 (inflections and undulations), A376601 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power).
Sequence in context: A117997 A079684 A358138 * A033761 A033805 A033797
KEYWORD
sign
AUTHOR
Gus Wiseman, Oct 02 2024
STATUS
approved