MathLabs

Problem 4

Determine all pairs (n,p)(n,p) of positive integers such that p p is a prime, n n not exceeded 2p2p , and (p−1)n+1(p-1)^n+1 is divisible by np−1 n^{p-1}.
Step 4 of 5: Exclude primes larger than three
In plain words

The first nonzero binomial term has exactly p p -adic order two.

(p−1)p+1≡p2(modp3)(p-1)^p+1\equiv p^2\pmod {p^3}
Detailed analysis

For n=p n=p , the binomial expansion gives (p−1)p+1=(−1+p)p+1=p2+a multiple of p3(p-1)^p+1=(-1+p)^p+1=p^2+\text{a multiple of }p^3. For p>3 p>3, divisibility by pp−1 p^{p-1} would imply divisibility by p3 p^3, contradiction.