Divisor Count Function of Prime Number

Theorem
Let $p \in \Z_{> 0}$.

Then $p$ is a prime number iff:
 * $\tau \left({p}\right) = 2$

where $\tau \left({p}\right)$ denotes the tau function of $p$.

Necessary Condition
Let $p$ be a prime number.

Then by definition, the only positive divisors of $p$ are $1$ and $p$.

Hence by definition, $\tau \left({p}\right) = 2$.

Sufficient Condition
Suppose $\tau \left({p}\right) = 2$.

Then by Integer Divisor Results: One Divides All Integers we have:
 * $1 \mathop \backslash p$

Also, by Integer Divisor Results: Every Integer Divides Itself we have:
 * $p \mathop \backslash p$

So if $p > 1$ it follows that $\tau \left({p}\right) \ge 2$.

Now for $\tau \left({p}\right) = 2$ it must follow that the only divisors of $p$ are $1$ and $p$.

That is, that $p$ is a prime number.

Also see
Some sources use this result to define a prime number.