A376599 Second differences of consecutive non-prime-powers inclusive (A024619). First differences of A375735.
-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
Keywords
Examples
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, ...
Crossrefs
A007916 lists non-perfect-powers.
A057820 gives first differences of prime-powers inclusive, first appearances A376341, sorted A376340.
For non-prime-powers: A024619/A361102 (terms), A375735/A375708 (first differences), A376600 (inflections and undulations), A376601 (nonzero curvature).
Programs
-
Mathematica
Differences[Select[Range[100],!(#==1||PrimePowerQ[#])&],2]
-
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
Comments