How can we from $\sum\_{n\leqslant x}\mu (n)=o(x)$ deduce $\sum\_{n\leqslant x}(-1)^{\omega(n)}=o(x)$, where $\omega(n)$ is the number of different primes dividing $n$ and
$\mu (n)$ is the Möbius function?
Heuristic: Up to x there must be roughly the same portion of numbers with odd and even number of prime divisors. First equality ( equivalent to prime number theorem ) prooves that for square free numbers, and there is no reason why should it not be valid for all numbers



Connection between Möbius and  function
Yes, that deduction is possible, but somewhat indirectly.


The estimate $\sum\_{n \leq x} \mu(n) = o(x)$ is equivalent to the nonvanishing of $\zeta(s)$ on ${\rm Re}(s) = 1$ since both conditions are known to be equivalent to the prime number theorem. (Maybe one can directly deduce the estimate and the nonvanishing from each other without going *through* the prime number theorem, but that's a side issue here.) The function $\zeta(s)$ is known by elementary techniques to be meromorphic on ${\rm Re}(s) = 1$ with a simple pole at $s = 1$, so the nonvanishing of $\zeta(s)$ on that line is equivalent to the function $1/\zeta(s)$ being analytic on ${\rm Re}(s) = 1$. I will show $\sum\_{n \leq x} (-1)^{\omega(n)} = o(x)$ follows from analyticity of $1/\zeta(s)$ on ${\rm Re}(s) = 1$, so in a rather indirect way $\sum\_{n \leq x} (-1)^{\omega(n)} = o(x)$ follows from the estimate $\sum\_{n \leq x} \mu(n) = o(x)$.


Set $F(s) := \sum\_{n \geq 1} (-1)^{\omega(n)}/n^s$ for ${\rm Re}(s) > 1$.
As David Speyer observed in his answer, for ${\rm Re}(s) > 1$ we have
$$
F(s) = 
\prod\_p \frac{1-2/p^s}{1-1/p^s} = \frac{1}{\zeta(s)}\prod\_p \frac{1-2/p^s}{(1-1/p^s)^2} 
$$
and the $p$-th term on the right for ${\rm Re}(s) \geq 1$ is $1 + O(1/p^{2s})$ with $O$-constant $4$ since $|1/p^{s}| \leq 1/2^{{\rm Re}(s)} \leq 1/2$ and
$(1-2z)/(1-z)^2 = 1 + O(z^2)$ for $|z| \leq 1/2$ with $O$-constant $4$: $(1-2z)/(1-z)^2 - 1 = -z^2/(1-z)^2$ and $|1/(1-z)^2| \leq 4$. So the infinite product over $p$ on the right, which David calls $B(s)$, is holomorphic for ${\rm Re}(s) \geq 1$ (in fact, $B(s)$ converges and is holomorphic for ${\rm Re}(s) > 1/2$ since $\sum 1/p^{2s}$ converges for ${\rm Re}(s) > 1/2$). Since $\zeta(s)$ is meromorphic on ${\rm Re}(s) \geq 1$, $F(s)$ has a meromorphic continuation to ${\rm Re}(s) \geq 1$.


From $1/\zeta(s)$ being analytic on ${\rm Re}(s) \geq 1$, $F(s)$ has an analytic continuation to ${\rm Re}(s) \geq 1$. Now we will apply the following theorem, which is a consequence of Newman's Tauberian theorem (one of the approaches to proving the prime number theorem).


**Theorem**. *If the Dirichlet series* $\sum\_{n \geq 1} b\_n/n^s$ *converges for* ${\rm Re}(s) > 1$, $|b\_n| \leq 1$, *and the series has an analytic continuation to* ${\rm Re}(s) \geq 1$ *then* $(1/x)\sum\_{n \leq x} b\_n \to 0$ *as* $x \to \infty$.


In this theorem use $b\_n = (-1)^{\omega(n)}$ to see that analyticity of $1/\zeta(s)$ on ${\rm Re}(s) = 1$ implies $(1/x)\sum\_{n \leq x}(-1)^{\omega(n)} \to 0$ as $x \to \infty$.


What about a converse: does $(1/x)\sum\_{n \leq x}(-1)^{\omega(n)} \to 0$ as $x \to \infty$ imply $1/\zeta(s)$ is analytic on ${\rm Re}(s) =1$ (and thus imply $\sum\_{n \leq x} \mu(n) = o(x)$)? Set $A(x) = \sum\_{n \leq x} (-1)^{\omega(n)}$, so trivially $|A(x)/x|$ is bounded and we are assuming that in fact $A(x)/x \to 0$ as $x \to \infty$.


We already pointed out that the Dirichlet series $F(s) = \sum (-1)^{\omega(n)}/n^s$ has a meromorphic continuation to ${\rm Re}(s) \geq 1$ without using any information about possible zeros of $\zeta(s)$ on the line ${\rm Re}(s) = 1$.


**Theorem**. *Assume a Dirichlet series* $G(s) := \sum\_{n \geq 1} a\_n/n^s$ *converges for* ${\rm Re}(s) > 1$ *and* $G(s)$ *has a meromorphic continuation to* ${\rm Re}(s) \geq 1$. *If* $(1/x)\sum\_{n \leq x} a\_n \to 0$ *as* $x \to \infty$ *then* $G(s)$ *is holomorphic on the line* ${\rm Re}(s) = 1$.


Use this theorem with $a\_n = (-1)^{\omega(n)}$ to see that if $A(x)/x \to 0$ as $x \to \infty$, then $F(s)$ is holomorphic on ${\rm Re}(s) = 1$. What does analyticity of $F(s)$ on ${\rm Re}(s) = 1$ tell us about analyticity of $1/\zeta(s)$ on that line? In the formula for $F(s)$ as an infinite product over primes when ${\rm Re}(s) > 1$, let's extract the $p = 2$ term:
$$
F(s) = 
\prod\_p \frac{1-2/p^s}{1-1/p^s} = \frac{1}{\zeta(s)}\frac{1-2/2^s}{(1-1/2^s)^2}\prod\_{p \geq 3} \frac{1-2/p^s}{(1-1/p^s)^2}. 
$$
To reciprocate the product on the right over $p \geq 3$, let's see how quickly the reciprocals of the factors tend to $1$.
For $|z| \leq 1/3$ we have $(1-z)^2/(1-2z) = 1 + z^2/(1-2z)$ and $|1/(1-2z)| \leq 3$, so
$(1-z)^2/(1-2z) = 1 + O(z^2)$ with $O$-constant $3$.
Therefore $(1-1/p^s)^2/(1-2/p^s) = 1 + O(1/p^{2s})$ for ${\rm Re}(s) \geq 1$ and $p \geq 3$ with $O$-constant 3, so
$$
\frac{1}{\zeta(s)}\frac{1-2/2^s}{(1-1/2^s)^2} = F(s)\cdot\prod\_{p \geq 3} \frac{(1-1/p^s)^2}{1-2/p^s}
$$
where the product on the right converges and is analytic for ${\rm Re}(s) \geq 1$ (and in fact for ${\rm Re}(s) > 1/2$). Therefore analyticity of $F(s)$ on the line ${\rm Re}(s) = 1$ implies the expression on the left side of the displayed equation just above is analytic on ${\rm Re}(s) = 1$. The factor $1-1/2^s$ is nonvanishing on ${\rm Re}(s) > 0$, so
$(1-2/2^s)/\zeta(s)$ is analytic on ${\rm Re}(s) = 1$. Since $1-2/2^s$ is analytic on ${\rm Re}(s) = 1$ with zeros only at the points $s\_k = 1 + 2\pi ik/\log 2$ where $k \in \mathbf Z$, the meromorphic function $1/\zeta(s)$ is analytic on
the line ${\rm Re}(s) = 1$ except for possible poles at the points $s\_k$.


All that remains to be done to get the desired converse result is show $1/\zeta(s)$ has no pole at each $s\_k$, or equivalently that $\zeta(s)$ is nonvanishing at each $s\_k$. I don't see right now how to do that in the context of this problem. (While we *know* $\zeta(s) \not= 0$ on the whole line ${\rm Re}(s) = 1$ from methods used to prove the prime number theorem, it's not fair to use such arguments here.) I am reminded here of the trick of comparing the products $(1-2/2^s)\zeta(s)$ and $(1-3/3^s)\zeta(s)$ in one of the proofs that $\zeta(s)$ is analytic on ${\rm Re}(s) > 0$ except for a simple pole at $s = 1$, but I don't see how to modify that.
If someone has a useful suggestion to finish this argument, please put it in the comments.


