OFFSET
1,2
COMMENTS
The asymptotic density of this sequence is 1/zeta(2) - Product_{p prime} (1 - 2/p^2) = A059956 - A065474 = 0.2852930029... (Matomäki et al., 2016) - Amiram Eldar, Feb 14 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Kaisa Matomäki, Maksym Radziwiłł and Terence Tao, Sign patterns of the Liouville and Möbius functions, Forum of Mathematics, Sigma, Vol. 4. (2016), e14.
Eric Weisstein's World of Mathematics, Squarefree.
FORMULA
EXAMPLE
1 begins a new chain 1, 2, 3 of squarefree integers. 4 is not squarefree. Then 5 begins a new chain 5, 6, 7 of squarefree integers. Hence 1 and 5 are terms of the sequence.
MATHEMATICA
Select[Range[100], MoebiusMu[# - 1] == 0 && Abs[MoebiusMu[#]] == 1 &] (* Amiram Eldar, Feb 14 2021 *)
SequencePosition[Table[If[SquareFreeQ[n], 1, 0], {n, 0, 250}], {0, 1}][[All, 2]]-1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 24 2021 *)
PROG
(PARI) n=1; for(k=1, 100, while(!issquarefree(n), n=n+1); print1(n", "); while(issquarefree(n), n=n+1))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Jul 10 2002
EXTENSIONS
More terms from Ralf Stephan, Mar 19 2003
STATUS
approved