# Liouville function and perfect square

Let $n \in \mathbb{Z}$ with $n > 0$. Let $F(n) = \sum_{d \mid n} \lambda(d)$. Prove that $$F(n) = \begin{cases}1, \quad \text{if }n \text{ is a perfect square}\\ 0, \quad \text{otherwise} \end{cases}$$

By the Fundamental Theorem of Arithmetic, all $d$'s admit a prime factorization $d=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$ for primes $p_i$ and nonnegative integers $a_i$. So $\lambda(d)=\lambda(p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k})$. Now the idea is that all the divisors will cancel in pairs of $1$ and $-1$ when $n$ is a perfect square, except the divisor $1$, and so the sum will total $1$. How do I prove this rigorously? If I just choose a generic divisor and write it's prime factorization I don't find anything I can generalize. Can you help?

• note that Liouville function is multiplicative so it is enough to check it for prime powers only. Commented Oct 6, 2013 at 2:45
• So prime powers $p_i^{a_i}$ for each prime? But we have divisors which have mixed primes, like $p_1^{a_1}p_2^{a_2}$ is a divisor. I know I can split it up like $\lambda(p_1^{a_1}p_2^{a_2})=\lambda(p_1^{a_1}) \lambda(p_2^{a_2})$ but how does the argument go for the pairwise cancellation with this? Commented Oct 6, 2013 at 2:48
• @BoSchmidt No, what leshik means is that if $\lambda(n)$ is multiplicative then so is $\sum_{d\mid n} \lambda(d)$. Whenever you have two functions $f(n)$ and $g(n)$ which are known to be multiplicative, proving $f(p^k) = g(p^k)$ for every prime power $p^k$ is enough to show $f(n) = g(n)$ for all $n$. This avoids having to worry about mixed prime divisors. Commented Oct 6, 2013 at 7:06
• This is the Theorem 2.19 in the book "Introduction to Analytic Number Theory" of Tom M. Apostol. Springer-Verlag, New York-Heidelberg-Berlin. (En traducción al Español, está en la página 46). The theorem add the property $\lambda^{-1}(n)=|\mu (n)|$ where $\mu$ is the Möbius function. Commented Jul 20, 2016 at 12:36
• Hi! I know I am pretty late. But I am stuck while studying this from the book by Tom Apostol. I understood how $\lambda(n)$ is completely multiplicative but I am not able to understand how $\sum_{d|n}{\lambda(d)}$ is multiplicative. Anyone, please help! Just a hint will do. I must be missing something obvious. Commented May 24, 2021 at 12:23

You can prove it using "multiplicative" property and it's simple but I just solved it without it and I believe that it's much more beautiful.

Consider $$n=p_{1}^{a_1} p_2^{a_2} ... p_k^{a_k}$$

So $\Omega(n)=\sum a_i$ and $\lambda(n)=(-1)^{\Omega(n)}$

Now $$\sum_{d|n}\lambda(d)=\sum_{d|n}(-1)^{\Omega(d)}$$

So it's suffices to calculate $D$; the difference of the number of divisor with even $\Omega$ and odd $\Omega.$

Now consider $f(x)=(1+x+x^2+...+x^{a_1})(1+x+x^2+...+x^{a_2})...(1+x+x^2+...+x^{a_k})$

The coefficient of $x^r$ in above expansion is equal to the number of solutions of this equation:

$$x_1+x_2+...+x_k=r$$ $$0 \le x_i \le a_i$$ which is the number of divisors of $n$ with $\Omega$ equals to $r$.

Hence, $f(-1)=D.$

But $f(-1)$ is $0$ if at least one of $a_i$ is odd and $f(-1)=1$ if $n$ is a perfect square. $Q.E.D$

As a second solution:

It's easy to check $\lambda=1_{Sq}*\mu$

$[$ Actually the summation has only one term.$]$

Now convolve both sides with the $1$ function [which is inverse of $\mu$]

$$\lambda * 1=1_{Sq}*\mu*1=1_{Sq}$$

.

• the most natural answer is that $\zeta(s) = \prod_p \frac{1}{1-p^{-s}}$ so that $\frac{\zeta(2s)}{\zeta(s)} = \prod_p \frac{1}{1+p^{-s}}= \sum_n \lambda(n) n^{-s}$ and $\sum_n \sum_{d | n} \lambda(d) n^{-s} = (\sum_n \lambda(n) n^{-s})(\sum_n n^{-s})$ $= \frac{\zeta(2s)}{\zeta(s)} \zeta(s) = \zeta(2s) = \sum_n n^{-2s} = \sum_n n^{-s} 1_{n \text{ is a square}}$ Commented Jul 20, 2016 at 15:21
• @user1952009 it was exactly what i said in the second proof... Commented Jul 20, 2016 at 15:32
• no because what I wrote is clear and rigorous :) Commented Jul 20, 2016 at 15:33
• @user1952009 it's what you think yourself! :D Commented Jul 20, 2016 at 15:36
• @user1952009 Convolution is the base of Dirichlet series production and is as powerful as Dirichlet series Commented Jul 20, 2016 at 15:41

Here's an elementary approach:

• $$F$$ is multiplicative for prime powers. It follows from the fact that the Liouville function $$\lambda$$ is multiplicative. Let $$p^k$$ and $$q^l$$ be two prime powers. Then, $$F(p^kq^l)=\sum_{i=0}^k\sum_{j=0}^l\lambda(p^iq^j)=\sum_{i=0}^k\sum_{j=0}^l\lambda(p^i)\lambda(q^j)=\left(\sum_{i=0}^k\lambda(p^i)\right)\left(\sum_{j=0}^l\lambda(q^j)\right)=F(p^k)F(q^l).$$

• The result holds for prime towers. Because \begin{align*} F(p^k)=\sum_{i=0}^k\lambda(p^i)=\sum_{i=0}^k(-1)^i=\frac{1-(-1)^{k+1}}{1-(-1)}=\frac{1+(-1)^k}{2}=\begin{cases}1&\text{if }k\text{ is even}\\ 0&\text{if }k\text{ is odd}\end{cases}. \end{align*}

• Factor. Let $$n=p_1^{k_1}p_2^{k_2}\cdots p_r^{k_r}$$ where the primes $$p_i$$ are distinct. Then, $$F(n)=F(p_1^{k_1})F(p_2^{k_2})\cdots F(p_r^{k_r})=\begin{cases}1&\text{if }k_1,\ldots,k_r\text{ are all even}\\ 0&\text{otherwise}\end{cases}=\begin{cases}1&\text{if }n\text{ is a }\square\\ 0&\text{otherwise}\end{cases}.$$