[Math] Prove that if $\sigma(n)$ is odd, $n$ is either a square or twice a square.

elementary-number-theorynumber theory

I think I have proved it and just wanted to see if anyone can confirm. I have this.

We need to prove that $\sigma(n)$ is odd iff $n = t^2$ or $n = 2t^2$ for some positive $t$.

First lets show that if $\sigma(n)$ is odd, then $n = t^2$ or $n = 2t^2$, and then prove it the other way around.

If $\sigma(n)$ is odd, and the ppd of $n$ is $p_1 \times p_2 \times p_3 \times\ldots\times p_n$, then the sigma of each of those primes must be odd, in order for $\sigma(n)$ to be odd. The only prime with power $1$ that has an $\sigma$ which is odd, is $2$. The rest are all even, unless the ppd of $n$ is $p_1^{2x} \times p_2^{2x}\times\ldots\times p_n^{2x}$ for any positive $x$. Multiplying all those primes gives some number $t^2$ or $2t^2$, since $\sigma(2)$ is odd.

Now, lets show that if $n = t^2 or n = 2t^2$, then $\sigma(n)$ is odd. If $n = t^2$, the pdd of $n$ is $p_1^{2x} \times p_2^{2x} \times \ldots \times p_n^{2x}$ for some positive $x$. $\sigma(p_i^{2x}) = 1 +$ an even number of $p$'s, which is odd. Multiplying odd numbers gives an odd number. So the $\sigma(t^2)$ is odd. The $\sigma(2t^2)$ is also odd since the only change to the ppd is $2$, and $\sigma(2)$ is odd.

Best Answer

I'l take it that $\sigma(n)=\sigma_1(n)$ is the sum-of-divisors function.

For prime powers $p^a$ we have $\sigma(p^a)= p^a+\sigma(p^{a-1})$ with $\sigma(1)=1$. This means that $\sigma(2^a)$ is always odd and that for any odd prime, $\sigma(p^a)$ is odd exactly when $a$ is even.

For other composite numbers $n=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$, we have $\sigma(n)=\sigma(p_1^{a_1})\sigma(p_2^{a_2})\cdots \sigma(p_k^{a_k})$.

Thus $\Rightarrow$ : $\sigma(n)$ is odd exactly when all the composing prime powers of $n$ have odd $\sigma$ - that is, when all the odd primes that divide $n$ have even exponents. Since a product of squares is square, we have $n$ with odd $\sigma(n)$ is a power of $2$ times an odd square, and every power of $2$ is either square or twice a square, as required.

And $\Leftarrow$ : for $n=t^2$, with $t=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$ giving $n=p_1^{2a_1}p_2^{2a_2}\cdots p_k^{2a_k}$ we have $\sigma(n)$ is odd. For $n=2t^2,$ with $t=2^ap_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$ giving $n=2^{2a+1}p_1^{2a_1}p_2^{2a_2}\cdots p_k^{2a_k}$ we again have $\sigma(n)$ odd.

Related Question