Can someone help me prove that $\tau(n)$ is odd iff $n$ is a perfect square.

3.3k Views Asked by At

Can someone help me prove that $\tau(n)$ is odd if and only if $n$ is a perfect square.

So basically I have to prove that $\tau(n)$ is odd iff $n = k^2$ for some integer $k$.

$\tau(n)$ is the function which gives the number of positive divisors of n, including n itself.

1

There are 1 best solutions below

0
On

There is a bijection between the divisors of $n< \sqrt n$ and the divisors of $n>\sqrt n$, defined by $d\longmapsto \dfrac nd$ (this bijection goes both ways). This bijection gives an even number of divisors, since $d\neq \dfrac nd$. There is one more divisor (hence an odd number of divisors) if and only if $\sqrt n$ is an integer, i.e. $n=k^2$ for an integer $k$.