Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A376593
Second differences of consecutive nonsquarefree numbers (A013929). First differences of A078147.
26
-3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, 3, 0, -1, -2, 3, -3, 2, 1, -2, 0, 2, -2, -1, 0, 3, 0, 0, 0, -3, 2, -2, 2, -2, 0, 1, 2, -1, -2, 3, 0, -1, -2, 1, 0, -1, 2, 1, -2, 0, 2, -3, 1, -1, 2, -2, 3, 0, 0, -3, 2, 1, -2, 0, 2
OFFSET
1,1
COMMENTS
The range is {-3, -2, -1, 0, 1, 2, 3}.
EXAMPLE
The nonsquarefree numbers (A013929) are:
4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, ...
with first differences (A078147):
4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, 4, 4, ...
with first differences (A376593):
-3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, ...
MATHEMATICA
Differences[Select[Range[100], !SquareFreeQ[#]&], 2]
PROG
(Python)
from math import isqrt
from sympy import mobius, factorint
def A376593(n):
def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k: m, k = k, f(k)
k = next(i for i in range(1, 5) if any(d>1 for d in factorint(m+i).values()))
return next(i for i in range(1-k, 5-k) if any(d>1 for d in factorint(m+(k<<1)+i).values())) # Chai Wah Wu, Oct 02 2024
CROSSREFS
The version for A000002 is A376604, first differences of A054354.
The first differences were A078147.
Zeros are A376594, complement A376595.
A000040 lists the prime numbers, differences A001223.
A005117 lists squarefree numbers, differences A076259.
A064113 lists positions of adjacent equal prime gaps.
A114374 counts partitions into nonsquarefree numbers.
A246655 lists prime-powers exclusive, inclusive A000961.
A333254 lists run-lengths of differences between consecutive primes.
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).
For nonsquarefree numbers: A013929 (terms), A078147 (first differences), A376594 (inflections and undulations), A376595 (nonzero curvature).
Sequence in context: A136170 A245188 A137241 * A331539 A306287 A016457
KEYWORD
sign
AUTHOR
Gus Wiseman, Oct 01 2024
STATUS
approved