%I #43 Jun 13 2024 14:57:35
%S 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,
%T 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,
%U 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
%N Lengths of successive gaps between squarefree numbers.
%C From _Gus Wiseman_, Jun 11 2024: (Start)
%C Also the length of the n-th maximal run of nonsquarefree numbers. These runs begin:
%C 4
%C 8 9
%C 12
%C 16
%C 18
%C 20
%C 24 25
%C 27 28
%C 32
%C 36
%C 40
%C 44 45
%C 48 49 50
%C (End)
%H Peter Kagey, <a href="/A053797/b053797.txt">Table of n, a(n) for n = 1..10000</a>
%H M. Filaseta and O. Trifonov, <a href="http://dx.doi.org/10.1007/978-1-4612-3464-7_15">On Gaps between Squarefree Numbers</a>. In Analytic Number Theory, Vol 85, 1990, Birkhäuser, Basel, pp. 235-253.
%H E. Fogels, <a href="http://dx.doi.org/10.1017/S0305004100017990">On the average values of arithmetic functions</a>, Proc. Cambridge Philos. Soc. 1941, 37: 358-372.
%H L. Marmet, <a href="http://www.marmet.org/louis/sqfgap/">First occurrences of squarefree gaps...</a>
%H L. Marmet, <a href="http://arxiv.org/abs/1210.3829">First occurrences of square-free gaps and an algorithm for their computation</a>, arXiv preprint arXiv:1210.3829 [math.NT], 2012. - From _N. J. A. Sloane_, Jan 01 2013
%H K. F. Roth, <a href="https://doi.org/10.1112/jlms/s1-26.4.263">On the gaps between squarefree numbers</a>, J. London Math. Soc. 1951 (2) 26:263-268.
%H Gus Wiseman, <a href="/A373403/a373403.txt">Four statistics for runs and antiruns of prime, nonprime, squarefree, and nonsquarefree numbers</a>
%e 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).
%p SF:= select(numtheory:-issqrfree,[$1..1000]):
%p map(`-`,select(`>`,SF[2..-1]-SF[1..-2],1),1); # _Robert Israel_, Sep 22 2015
%t ReplaceAll[Differences[Select[Range@384, SquareFreeQ]] - 1, 0 -> Nothing] (* _Michael De Vlieger_, Sep 22 2015 *)
%Y Gaps between terms of A005117.
%Y For squarefree runs we have A120992, antiruns A373127 (firsts A373128).
%Y For composite runs we have A176246 (rest of A046933), antiruns A373403.
%Y For prime runs we have A251092 (rest of A175632), antiruns A027833.
%Y Position of first appearance of n is A373199(n).
%Y For antiruns instead of runs we have A373409.
%Y A005117 lists the squarefree numbers, first differences A076259.
%Y A013929 lists the nonsquarefree numbers, first differences A078147.
%Y Cf. A007674, A020754, A045882, A053806, A061398, A061399.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_, Apr 07 2000
%E Offset set to 1 by _Peter Kagey_, Sep 29 2015