MathLabs

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 2 of 7: Handle p=2
p=2:n≤4,(2,2),(2,4) work, while (2,1),(2,3) do not.p=2:\quad n\le4,\quad (2,2),(2,4)\text{ work, while }(2,1),(2,3)\text{ do not}.
Detailed analysis

For p=2, 2^n>n^2 for n≥5, so only n=1,2,3,4 remain. Substitution shows exactly n=2 and n=4 satisfy the divisibility condition.