Problem
NT-B1-M01-P020 Exactly Three Divisors
#20
★★★☆☆ Level 3 of 5
Prove that a positive integer has exactly \(3\) positive divisors if and only if it is the square of a prime.
Use the formula \(\tau(n)=(\alpha_1+1)\cdots(\alpha_s+1)\).
If \(n=p^2\), where \(p\) is prime, its divisors are \(1,p,p^2\), exactly \(3\). Conversely, let \(n=q_1^{\alpha_1}\cdots q_s^{\alpha_s}\). Then \(\tau(n)=(\alpha_1+1)\cdots(\alpha_s+1)=3\). Since \(3\) is prime, the product can have only one factor equal to \(3\). Hence \(s=1\) and \(\alpha_1=2\), so \(n=q_1^2\), the square of a prime.
A short proof, but important for structure-of-number problems.