Problem 3
Determine all pairs (p,n), where p is a prime number and n is a positive integer, for which (n^p+1)/(p^n+1) is an integer.
Step 5 of 7: Determine the order
Detailed analysis
Let e be the least positive exponent with n^e≡1 modulo p+1. Division of 2p by e and minimality give e|2p. The cases e=1 or p contradict n^p≡−1. Euler's theorem and φ(p+1)<2p exclude e=2p, leaving e=2.