[go: up one dir, main page]

login
A376590
Second differences of consecutive squarefree numbers (A005117). First differences of A076259.
28
0, 1, -1, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 2, 0, -2, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 2, -2, 3, -2, 0, 0, -1, 0, 1, -1, 2, -2, 0, 1, -1, 0, 1, -1, 2, -2, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 1, 2, -3, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 2, -2, 2, -2, 3, -2, -1
OFFSET
1,5
EXAMPLE
The squarefree numbers (A005117) are:
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, ...
with first differences (A076259):
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, ...
with first differences (A376590):
0, 1, -1, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 2, 0, -2, 0, 1, -1, 0, 1, -1, 0, 1, ...
MATHEMATICA
Differences[Select[Range[100], SquareFreeQ], 2]
PROG
(Python)
from math import isqrt
from sympy import mobius
def A376590(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 n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
a = iterfun(f, n)
b = iterfun(lambda x:f(x)+1, a)
return a+iterfun(lambda x:f(x)+2, b)-(b<<1) # Chai Wah Wu, Oct 02 2024
CROSSREFS
The version for A000002 is A376604, first differences of A054354.
The first differences were A076259, see also A375927, A376305, A376306, A376307, A376311.
Zeros are A376591, complement A376592.
Sorted positions of first appearances are A376655.
A000040 lists the prime numbers, differences A001223.
A001597 lists perfect-powers, complement A007916.
A005117 lists squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.
A333254 lists run-lengths of differences between consecutive primes.
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).
For squarefree numbers: A076259 (first differences), A376591 (inflections and undulations), A376592 (nonzero curvature), A376655 (sorted first positions).
Sequence in context: A368753 A345907 A293019 * A087479 A263343 A326413
KEYWORD
sign
AUTHOR
Gus Wiseman, Oct 01 2024
STATUS
approved