Example 33([40.4]) Find the set of positive integer pairs $\{p, n\}$, satisfying the conditions:
(i) $p$ is a prime; $\square$
(ii) $n \leqslant 2 p$;
(iii) $(p-1)^{n}+1$ is divisible by $n^{p-1}$.
For any prime $p$, the pair $\{p, 1\}$ is a solution; when $p=2$, the only solutions are the pairs $\{2,1\},\{2,2\}$. Therefore, we only need to discuss the case $p \geqslant 3, n>1$.

If the pair $\{p, n\}$ is a solution, $p \geqslant 3, n>1$, then $n$ must be an odd number. We need to further discuss the conditions that such an $n$ should satisfy. For this, let the smallest prime factor of $n$ be $q$, and set $n=q^{d} m, \quad m$ where the prime factors of $m$ are all greater than $q$ (this is a common method).
Using Fermat's Little Theorem $a^{q} \equiv a(\bmod q)$, from $(p-1)^{n}+1 \equiv 0(\bmod q)$ we derive
$$(p-1)^{m}+1 \equiv 0(\bmod q)$$

Thus, we have $(p-1)^{2 m}-1 \equiv 0(\bmod q)$. From this and $(p-1)^{q-1}-1 \equiv 0(\bmod q)$, we derive (why)
$$(p-1)^{(2 m, q-1)}-1 \equiv 0(\bmod q)$$

From this and $(m, q-1)=1$, we get
$$(p-1)^{2}-1=p(p-2) \equiv 0(\bmod q)$$

It is impossible to have $q \mid p-2$, because this and $(p-1)^{m}+1 \equiv 0(\bmod q)$ would imply $q \mid 2$. Therefore, we must have $\square$
$$q=p, \quad n=p^{d} m .$$

From this and the condition $n \leqslant 2 p$, we derive $n=p$, and further from condition (iii), we derive that we must have $n=p=3$.