# Sum of divisors

Bonjour!
I'm trying this number-theory problem, but i don't have any idea how to solve it.
Can you give me some hints ?

We have got any $\mathbb{Z_+}$ number. Let it be $n$.
Then we must proof that $2 \nmid \sigma(n) \implies n = k^2 \vee n = 2k^2$.
Thanks for any help

-

Let $n=2^e m$ where $m$ is odd. Note that $\sigma(2^e)$ is odd. So by the multiplicativity of $\sigma$, $\sigma(n)$ is odd iff $\sigma(m)$ is odd. Any power of $2$ is a square or twice a square. So we need only show that if $\sigma(m)$ is odd for the odd number $m$, then $m$ is a perfect square.

If $m$ is not a perfect square, there is a prime $p$, necessarily odd, such that the highest power of $p$ that divides $m$ is $p^t$, where $t$ is odd.

But by multiplicativity, $1+p+\cdots+p^t$ divides $\sigma(m)$. And $1+p+\cdots+p^t$ is even, since it is the sum of an even number of odd numbers. This contradicts the fact that $\sigma(m)$ is odd.

Remark: The converse is straightforward: If $n$ has shape $w^2$ or $2w^2$, then $\sigma(n)$ is odd.

-

Hint: If the prime factorization of $n$ is $$n=\prod_k p_k^{e_k}\tag{1}$$ then \begin{align} \sigma(n) &=\prod_k\frac{p_k^{e_k+1}-1}{p_k-1}\\ &=\prod_k\left(1+p_k+p_k^2+\dots+p_k^{e_k}\right)\tag{2} \end{align} and count the number of summands in $(2)$.

-

If $n$ is odd, then $\sigma(n)$ is the sum of $\tau(n)$ odd divisors. For this sum to be odd, $\tau(n)$ must be odd. But that means that it is not possible to pair off divisors as pairs $(d, \frac n d)$, i.e. there is one divisor $d$ with $d=\frac nd$ and hence $n=d^2$.

If $n=2^rm$ with $m$ odd and $r>0$ then $\sigma(n)=\sigma(2^r)\sigma(m)$, hence $\sigma(m)$ is odd and by the preceding paragraph $m=d^2$ for some $d|m$. If $r=2s$ is even, then $n=(2^sd)^2$, and if $r=2s+1$ is odd then $n=2\cdot(2^rd)^2$.

-
Pairing arguments are probably always better. –  André Nicolas Sep 6 '12 at 21:00