= Solution
By the <primitive-root modulus classification>, $P(n)>0$ only for
$$
n=1,2,4,p^a,\ \text{or }2p^a
$$
with $p$ an odd prime, and then
$$
P(n)=\varphi(\varphi(n)).
$$
Fix $k\geq1$. The <finite fibres of the Euler totient function> imply that there are only finitely many possible values $m=\varphi(n)$ satisfying $\varphi(m)=k$. For each such $m$, the same result gives only finitely many $n$ satisfying $\varphi(n)=m$. The union of these finitely many finite sets is finite, proving the claim.
Back to article page