prove sum of divisors of a square number is odd

Don't know how to prove that sum of all divisors of a square number is always odd.

ex: $27 \vdots 1,3,9,27$; $27^2 = 729 \vdots 1,3,9,27,81,243,729$; $\sigma_1 \text{(divisor function)} = 1 + 3 + 9 + 27 + 81 + 243 + 729 = 1093$ is odd;

I think it somehow connected to a thing that every odd divisor gets some kind of a pair when a number is squared and 1 doesn't get it, but i can't formalize it. Need help.

-

Yes, you can assign a pair to every odd divisor, except one of them.

So, we have a square number $n^2$. Extract the largest power of $2$ from $n$ to get $n = 2^k m$ where $m$ is odd. Odd divisors of $n^2$ are the same as all divisors of $m^2$. If $d$ is a divisor of $m^2$, then $m^2/d$ is also its divisor. So they all come in pairs, except for $m$ which is paired with itself.

-

The divisors $1=d_1<d_2<\cdots <d_k=n^2$ can be partitioned into pairs $(d, \frac {n^2}d)$, except that there is no partner for $n$ itself. Therefore, the number of divisors is odd. Thus if $n$ itself is odd (and so are all its divisors), we have the sum of an odd number of odd numebrs, hence the result is odd. But if $n$ is even, we can write it as $n=m2^k$ wit $m$ odd. The odd divisors of $n^2$ are precisely the divisors of $m^2$. Their sum is odd and all other (even) divisors do not affect the parity of the sum.

-

Sum of divisors =$\prod_{p_i\mid n}(1+p_i+p_i^2+\cdots+p_i^{2P_i})$ where $p_i$s are distinct primes and $p_i^{P_i}\mid\mid n$

Now, $p_i^r+p_i^{2P_i+1-r}$ is even for all the prime divisor $p_i$ of $n$ for $0< r\le 2P_i+1-r\implies 0<r\le P_i$ leaving $p_i^0=1$ unpaired.

Alternatively, $p_i^k\equiv p_i\pmod 2$ for $k\ge 1$

So, $1+p_i+p_i^2+\cdots+p_i^{2P_i}\equiv 1+\sum_{1\le s\le 2P_i}p_i\pmod 2\equiv 1+2P_is\pmod 2\equiv 1$

-

The formula for $\sigma_1(n)$ for $\displaystyle{n=\prod_{i=1}^kp_i^{\alpha_i}}$ is $\displaystyle{\sigma_1(n)=\prod_{i=1}^k\frac{p_i^{\alpha_i+1}-1}{p_i-1}}$ (see this).

Therefore $\displaystyle{\sigma_1(n^2)=\prod_{i=1}^k\frac{p_i^{2\alpha_i+1}-1}{p_i-1}}$.
But $\frac{p_i^{2\alpha_i+1}-1}{p_i-1}=1+p_i+p_i^2+\ldots+p_i^{2\alpha_i}$ is always odd. Thus $\sigma_1(n^2)$ is odd as product of odd numbers.

-

If number is 144 then 144 = 12 × 12 = 2^4 × 3^2

so every square number is of the form a^2p × a^2q

total number of divisors = (2p + 1)(2q + 1) (2p + 1) and (2q + 1) both are odd numbers, so square number is having odd number of divisors.

-
why does the first line prove "every square number is of the form"? In your example I could choose $a=6, p=2, q=1$ but the number of divisors is not $35$ but $15$ or I could choose $a=1,p=16,q=9$ and the number of divisors is not $170$ – Ross Millikan Jan 21 '14 at 4:27