Divisor Count of Square-Free Integer is Power of 2

Theorem
Let $n$ be a square-free integer.

Let $\tau: \Z \to \Z$ be the $\tau$ function.

Then $\tau \left({n}\right) = 2^r$ for some $r \ge 1$.

The converse is not true in general.

That is, if $\tau \left({n}\right) = 2^r$ for some $r \ge 1$, it is not necessarily the case that $n$ is square-free.

Proof
Let $n$ be an integer such that $n \ge 2$, with prime decomposition $n = p_1^{k_1} p_2^{k_2} \ldots p_r^{k_r}$.

Then from Tau Function from Powers of Prime Decomposition we have that:
 * $\displaystyle \tau \left({n}\right) = \prod_{i \mathop = 1}^r \left({k_i + 1}\right)$

Let $n$ be square-free.

Then by definition:
 * $\forall i: 1 \le i \le r: k_i = 1$

So:
 * $\displaystyle \tau \left({n}\right) = \prod_{i \mathop = 1}^r \left({1 + 1}\right) = 2^r$

The statement about the converse is proved by counterexample:

Let $n = p^3$ where $p$ is prime.

Then $n$ is not square-free as $p^2 \mathop \backslash n$.

However, $\tau \left({n}\right) = 3 + 1 = 2^2$.