The density of square-free integers satisfying a congruence relation

The square-free integers have density $6/\pi^2$ in the sense that

$$\sum_{n\leq x}\mu^2(n)=6/\pi^2\cdot x+o(x).$$

In analogy to Dirichlet's theorem on arithmetic progressions, what is known about $$\frac1x\cdot\!\!\!\!\!\sum_{\substack{n\leq x\\ n\equiv a\pmod b}}\!\!\!\!\!\!\mu^2(n)$$ if $\gcd(a,b)$ is square-free? Is it true that it has a limit and that it does not depend on $a$? That is, that it equals $$\frac6{b\pi^2}\prod_{p^2\mid b}\frac1{1-p^{-2}}$$

• This can be understood by elementary counting of residue classes, since squarefreeness is determined by non-divisibility module every $p^2$. The key difference between this and the prime case is that $\prod_p (1-p^{-2})$ is convergent, so we can expand out sufficiently many terms and then bound the error by triangle inequality, and this crude error estimate goes to $0$ (in density). – Erick Wong Jan 11 '17 at 18:23
• In general $$\sum_{\underset{{\scriptstyle n\equiv a\,\mod\, q}}{n\leq x}}\mu^{2}(x)=f(a,b)x+O(\sqrt{x})$$ where $$f(a,b)=\frac{1}{b}\sum_{\underset{{\scriptstyle (m^{2},b)\mid a}}{m\geq1}}\frac{\mu(m)(m^{2},b)}{m^{2}}.$$ – Marco Cantarini Jan 12 '17 at 13:11

For $(a,q) = 1$, we write $\sum_{\substack{n \leq x \\ n \equiv a \pmod{q}}} \mu^2(n) = \frac{1}{\varphi(q)} \sum_{\chi \pmod{q}} \overline{\chi}(a) \sum_{n \leq x} \mu^2(n) \chi(n).$ Note that $\mu^2(n) \chi(n)$ is a multiplicative function with $\mu^2(p^k) \chi(p^k)$ equal to $1$ if $k = 0$, $\chi(p)$ if $k = 1$, and $0$ if $k \geq 2$. It follows that for $\Re(s) > 1$, $\sum_{n = 1}^{\infty} \frac{\mu^2(n) \chi(n)}{n^s} = \prod_p\left(1 + \frac{\chi(p)}{p^s}\right) = \prod_p \frac{1 - \chi^2(p) p^{-2s}}{1 - \chi(p) p^{-s}} = \frac{L(s,\chi)}{L(2s,\chi^2)}.$ So for $\sigma > 1$ and $x > 1$ a noninteger, Perron's inversion formula implies that $\sum_{\substack{n \leq x \\ n \equiv a \pmod{q}}} \mu^2(n) = \frac{1}{\varphi(q)} \sum_{\chi \pmod{q}} \overline{\chi}(a) \frac{1}{2\pi i} \int_{\sigma - i\infty}^{\sigma + i\infty} \frac{L(s,\chi)}{L(2s,\chi^2)} \frac{x^s}{s} \, ds.$ We may move the line of integration to the left of the line $\Re(s) = 1$, picking up a pole at $s = 1$ only when $\chi$ is the principal character. Since $\frac{L(s,\chi_0)}{L(2s,\chi_0^2)} = \prod_{p \mid q} \frac{1 - p^{-s}}{1 - p^{-2s}} \frac{\zeta(s)}{\zeta(2s)},$ $\zeta(2) = \pi^2/6$, and $\varphi(q) = q \prod_{p \mid q} (1 - p^{-1})$, we obtain by Cauchy's residue theorem that $\sum_{\substack{n \leq x \\ n \equiv a \pmod{q}}} \mu^2(n) = \frac{1}{q} \prod_{p \mid q} \frac{1}{1 - p^{-2}} \frac{6}{\pi^2} x + O_q(x^{1 - \delta})$ for some $\delta > 0$. (We can take $\delta < 1/2$ easily; with a little work using zero-free regions of $L(s,\chi)$, we can get an error term of the form $O_q(\sqrt{x} e^{-c\sqrt{\log x}})$.)
Alternatively, here is a proof by more elementary methods. Again, $\sum_{\substack{n \leq x \\ n \equiv a \pmod{q}}} \mu^2(n) = \frac{1}{\varphi(q)} \sum_{\chi \pmod{q}} \overline{\chi}(a) \sum_{n \leq x} \mu^2(n) \chi(n).$ We write $\mu^2(n) = \sum_{cd^2 = n} \mu(d)$ and interchange the order of summation, so that we get $\frac{1}{\varphi(q)} \sum_{\chi \pmod{q}} \overline{\chi}(a) \sum_{d \leq \sqrt{x}} \mu(d) \chi^2(d) \sum_{c \leq \frac{x}{d^2}} \chi(c).$ If $\chi$ is principal, the inner sum is $\frac{\varphi(q)}{q} \frac{x}{d^2} + O_q(1)$; in fact, the error term is easily shown to be $O(\sqrt{q} \log q)$. If $\chi$ is nonprincipal, the inner sum is $O_q(1)$; in fact, it is $O(\sqrt{q} \log q)$ by the Polya-Vinogradov inequality. So we get $\frac{x}{q} \sum_{d \leq \sqrt{x}} \frac{\mu(d) \chi_0(d)}{d^2} + O\left(\frac{\sqrt{q} \log q}{\varphi(q)} \sum_{\chi \pmod{q}} \sum_{d \leq \sqrt{x}} 1\right).$ The second term is $O(\sqrt{xq} \log q)$. The first term is equal to $\frac{x}{q} \sum_{d = 1}^{\infty} \frac{\mu(d) \chi_0(d)}{d^2} - \frac{x}{q} \sum_{d > \sqrt{x}} \frac{\mu(d) \chi_0(d)}{d^2}.$ The first term is $\frac{x}{q L(2,\chi_0)} = \frac{1}{q} \prod_{p \mid q} \frac{1}{1 - p^{-2}} \frac{6}{\pi^2} x,$ while the second term is easily seen to be $O\left(\frac{\sqrt{x}}{q}\right)$. So we get $\sum_{\substack{n \leq x \\ n \equiv a \pmod{q}}} \mu^2(n) = \frac{1}{q} \prod_{p \mid q} \frac{1}{1 - p^{-2}} \frac{6}{\pi^2} x + O\left(\sqrt{x q} \log q\right).$
• Shouldn't the product in the final result run over the primes with $p^2\mid q$?Just to make the densities sum up to $6/\pi^2$... – punctured dusk Jan 11 '17 at 18:26
• The densities sum up to $\frac{\varphi(q)}{q} \prod_{p \mid q} \frac{1}{1 - p^{-2}} \frac{6}{\pi^2}$ when we sum over $a$ modulo $q$ with $(a,q) = 1$. This is because there are $\varphi(q)$ such choices of $a$ out of all $q$ residue classes modulo $q$, and the additional term $\prod_{p \mid q} \frac{1}{1 - p^{-2}}$ can be thought of as quantifying the local obstruction that $n$ is coprime to $q$. – Peter Humphries Jan 11 '17 at 18:34
• Oh so this is for $\gcd(a,q)=1$, I see. As a corollary, for $d=\gcd(a,q)>1$ we get that the density is the one for $(a/d,q/d)$ divided by $d$. – punctured dusk Jan 11 '17 at 18:40