OFFSET
1,6
COMMENTS
Moebius(k)=1 iff k is the product of an even number of distinct primes (cf. A008683). See A057627 for Moebius(k)=0.
There was an old comment here that said a(n) was equal to A072613(n) + 1, but this is false (e.g., at n=210). - N. J. A. Sloane, Sep 10 2008
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000
Ed Pegg Jr., The Möbius Function (and squarefree numbers), Math Games, November 3, 2003.
Eric Weisstein's World of Mathematics, Mertens Conjecture.
FORMULA
Asymptotics: Let N(i) = number of k in the range [1,n] with mu(k) = i, for i = 0, 1, -1. Then we know N(1) + N(-1) ~ 6n/Pi^2 (see A059956). Also, assuming the Riemann hypothesis, | N(1) - N(-1) | < n^(1/2 + epsilon) (see the Mathworld Mertens Conjecture link). Hence a(n) = N(1) ~ 3n/Pi^2 + smaller order terms. - Stefan Steinerberger, Sep 10 2008
a(n) = (1/2)*Sum_{i=1..n} (mu(i)^2 + mu(i)) = (1/2)*(A013928(n+1) + A002321(n)). - Ridouane Oudra, Oct 19 2019
From Amiram Eldar, Oct 01 2023: (Start)
MAPLE
with(numtheory); M:=10000; c:=0; for n from 1 to M do if mobius(n) = 1 then c:=c+1; fi; lprint(n, c); od; # N. J. A. Sloane, Sep 14 2008
MATHEMATICA
a[n_] := If[MoebiusMu[n] == 1, 1, 0]; Accumulate@ Array[a, 100] (* Amiram Eldar, Oct 01 2023 *)
PROG
(PARI) for(n=1, 150, print1(sum(i=1, n, if(moebius(i)-1, 0, 1)), ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 02 2002
STATUS
approved