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.

A376593 Second differences of consecutive nonsquarefree numbers (A013929). First differences of A078147.

This page as a plain text file.
%I A376593 #10 Oct 02 2024 09:32:54
%S A376593 -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,
%T A376593 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,
%U A376593 2,1,-2,0,2,-3,1,-1,2,-2,3,0,0,-3,2,1,-2,0,2
%N A376593 Second differences of consecutive nonsquarefree numbers (A013929). First differences of A078147.
%C A376593 The range is {-3, -2, -1, 0, 1, 2, 3}.
%e A376593 The nonsquarefree numbers (A013929) are:
%e A376593   4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, ...
%e A376593 with first differences (A078147):
%e A376593   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, ...
%e A376593 with first differences (A376593):
%e A376593   -3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, ...
%t A376593 Differences[Select[Range[100],!SquareFreeQ[#]&],2]
%o A376593 (Python)
%o A376593 from math import isqrt
%o A376593 from sympy import mobius, factorint
%o A376593 def A376593(n):
%o A376593     def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
%o A376593     m, k = n, f(n)
%o A376593     while m != k: m, k = k, f(k)
%o A376593     k = next(i for i in range(1,5) if any(d>1 for d in factorint(m+i).values()))
%o A376593     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
%Y A376593 The version for A000002 is A376604, first differences of A054354.
%Y A376593 The first differences were A078147.
%Y A376593 Zeros are A376594, complement A376595.
%Y A376593 A000040 lists the prime numbers, differences A001223.
%Y A376593 A005117 lists squarefree numbers, differences A076259.
%Y A376593 A064113 lists positions of adjacent equal prime gaps.
%Y A376593 A114374 counts partitions into nonsquarefree numbers.
%Y A376593 A246655 lists prime-powers exclusive, inclusive A000961.
%Y A376593 A333254 lists run-lengths of differences between consecutive primes.
%Y A376593 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).
%Y A376593 For nonsquarefree numbers: A013929 (terms), A078147 (first differences), A376594 (inflections and undulations), A376595 (nonzero curvature).
%Y A376593 Cf. A061398, A053797, A053806, A120992, A182853, A251092, A373198, A375707, A376305, A376306, A376311, A376312, A376655.
%K A376593 sign
%O A376593 1,1
%A A376593 _Gus Wiseman_, Oct 01 2024