$d(n)$ is odd if and only if $n = k^2$ Can someone help me prove that $d(n)$ is odd if and only if $n = k^2$ for some integer $k$?
For reference:
$d(n)$ gives the number of positive divisors of $n$, including $n$ itself.

Hint : A number with the prime factorization $p_1^{a_1}\times ...\times p_n^{a_n}$ has
        $(a_1+1)\times ...\times (a_n+1)$ divisors. When is the latter product odd ?
