login
A053797
Lengths of successive gaps between squarefree numbers.
94
1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 2, 3, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 3, 1, 2, 2, 2, 1
OFFSET
1,2
COMMENTS
Also the length of the n-th maximal run of nonsquarefree numbers. These runs begin {4}, {8, 9}, {12}, {16}, {18}, {20}, {24, 25}, {27, 28}, {32}, {36}, {40}, {44, 45}, {48, 49, 50}, ... - Gus Wiseman, Jun 11 2024, edited by M. F. Hasler, Jul 10 2026
Gaps means here the number of integers between two squarefree numbers, not the difference of consecutive squarefree numbers as in "prime gaps". Only nonzero gaps are listed. - M. F. Hasler, Jul 10 2026
LINKS
M. Filaseta and O. Trifonov, On Gaps between Squarefree Numbers. In Analytic Number Theory, Vol 85, 1990, Birkhäuser, Basel, pp. 235-253.
E. Fogels, On the average values of arithmetic functions, Proc. Cambridge Philos. Soc. 1941, 37: 358-372.
L. Marmet, First occurrences of square-free gaps and an algorithm for their computation, arXiv preprint arXiv:1210.3829 [math.NT], 2012. (Formerly published on this personal web page.)
K. F. Roth, On the gaps between squarefree numbers, J. London Math. Soc. 1951 (2) 26:263-268.
EXAMPLE
The first gap is at 4 and has length 1; the next starts at 8 and has length 2 (since neither 8 nor 9 are squarefree).
MAPLE
SF:= select(numtheory:-issqrfree, [$1..1000]):
map(`-`, select(`>`, SF[2..-1]-SF[1..-2], 1), 1); # Robert Israel, Sep 22 2015
MATHEMATICA
ReplaceAll[Differences[Select[Range@384, SquareFreeQ]] - 1, 0 -> Nothing] (* Michael De Vlieger, Sep 22 2015 *)
PROG
(PARI) {A053797_list(upto=100, start=1, L=List()/*possibly extend an existing list*/)=forsquarefree(n=start+1, upto, my(g=-start-1+start=n[1]); g && listput(L, g)); L} \\ M. F. Hasler, Jul 10 2026
CROSSREFS
Gaps between terms of A005117.
For squarefree runs we have A120992, antiruns A373127 (firsts A373128).
For composite runs we have A176246 (rest of A046933), antiruns A373403.
For prime runs we have A251092 (rest of A175632), antiruns A027833.
Position of first appearance of n is A373199(n).
For antiruns instead of runs we have A373409.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
Sequence in context: A001179 A001876 A033182 * A254011 A361919 A372362
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Apr 07 2000
EXTENSIONS
Offset set to 1 by Peter Kagey, Sep 29 2015
STATUS
approved