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
Peter Kagey, Table of n, a(n) for n = 1..10000
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
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
