cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376590 Second differences of consecutive squarefree numbers (A005117). First differences of A076259.

This page as a plain text file.
%I A376590 #11 Oct 02 2024 12:26:06
%S 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,-1,0,2,-2,3,
%T A376590 -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,
%U A376590 2,-3,0,1,-1,0,1,-1,0,1,-1,0,2,-2,2,-2,3,-2,-1
%N A376590 Second differences of consecutive squarefree numbers (A005117). First differences of A076259.
%e A376590 The squarefree numbers (A005117) are:
%e A376590   1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, ...
%e A376590 with first differences (A076259):
%e A376590   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, ...
%e A376590 with first differences (A376590):
%e 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, ...
%t A376590 Differences[Select[Range[100],SquareFreeQ],2]
%o A376590 (Python)
%o A376590 from math import isqrt
%o A376590 from sympy import mobius
%o A376590 def A376590(n):
%o A376590     def iterfun(f,n=0):
%o A376590         m, k = n, f(n)
%o A376590         while m != k: m, k = k, f(k)
%o A376590         return m
%o A376590     def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
%o A376590     a = iterfun(f,n)
%o A376590     b = iterfun(lambda x:f(x)+1,a)
%o A376590     return a+iterfun(lambda x:f(x)+2,b)-(b<<1) # _Chai Wah Wu_, Oct 02 2024
%Y A376590 The version for A000002 is A376604, first differences of A054354.
%Y A376590 The first differences were A076259, see also A375927, A376305, A376306, A376307, A376311.
%Y A376590 Zeros are A376591, complement A376592.
%Y A376590 Sorted positions of first appearances are A376655.
%Y A376590 A000040 lists the prime numbers, differences A001223.
%Y A376590 A001597 lists perfect-powers, complement A007916.
%Y A376590 A005117 lists squarefree numbers, complement A013929 (differences A078147).
%Y A376590 A073576 counts integer partitions into squarefree numbers, factorizations A050320.
%Y A376590 A333254 lists run-lengths of differences between consecutive primes.
%Y A376590 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).
%Y A376590 For squarefree numbers: A076259 (first differences), A376591 (inflections and undulations), A376592 (nonzero curvature), A376655 (sorted first positions).
%Y A376590 Cf. A000961, A007674, A053797, A053806, A061398, A072284, A112925, A112926, A120992, A251092, A373198, A376342.
%K A376590 sign
%O A376590 1,5
%A A376590 _Gus Wiseman_, Oct 01 2024