We need to find all positive integer pairs (a,n) such that n(a+1)n−an is an integer.
First, observe that for n(a+1)n−an to be an integer, (a+1)n−an must be divisible by n.
Consider the smallest prime divisor p of n. We have:
(a+1)n≡an(modp).
This implies:
(aa+1)n≡1(modp).
Let z≡aa+1(modp). Then:
zn≡1(modp).
By Fermat's Little Theorem, we know:
zp−1≡1(modp).
Since zn≡1(modp), it follows that:
zgcd(n,p−1)≡1(modp).
Given that p is the smallest prime divisor of n, we have gcd(n,p−1)=1. Therefore:
z≡1(modp).
This implies:
aa+1≡1(modp),
which simplifies to:
a+1≡a(modp).
Thus:
1≡0(modp),
which is a contradiction unless n=1.
Therefore, the only solution is when n=1. In this case, 1(a+1)1−a1=1, which is always an integer for any positive integer a.
Hence, the solution is:
(a,n)=(a,1)
for any positive integer a.