1. **Prove that 5 is a nice number.**
Given: kn+m∣km+n for k=5, we need to show that n∣m.
Let's start by substituting k=5:
5n+m∣5m+n
Suppose gcd(m,n)=d, then we can write m=da and n=db where gcd(a,b)=1. Substituting these into the divisibility condition, we get:
5(db)+da∣5(da)+db
Simplifying, we have:
d(5b+a)∣d(5a+b)
Since d is a common factor, we can divide both sides by d:
5b+a∣5a+b
Now, we need to show that 5b+a∣5a+b. Consider the expression:
5a+b=(5b+a)⋅q+r
where q is the quotient and r is the remainder. Since 5b+a∣5a+b, the remainder r must be zero. Therefore:
5a+b=(5b+a)⋅q
Rearranging, we get:
5a+b−(5b+a)⋅q=0
Simplifying further:
5a+b−5bq−aq=0
5a+b=5bq+aq
5a+b=q(5b+a)
Since gcd(a,b)=1, the only way this can hold is if q=1 and 5b+a=5a+b. This implies:
5b+a=5a+b
4b=4a
b=a
Therefore, n=db and m=da imply n∣m.
2. Find all the nice numbers.
We need to find all k such that for any pair (m,n) of positive integers satisfying kn+m∣km+n, we have n∣m.
From the previous part, we know that k=5 is a nice number. Let's generalize this for any k.
Given kn+m∣km+n, we need to show that n∣m.
Suppose gcd(m,n)=d, then m=da and n=db where gcd(a,b)=1. Substituting these into the divisibility condition, we get:
k(db)+da∣k(da)+db
Simplifying, we have:
d(kb+a)∣d(ka+b)
Since d is a common factor, we can divide both sides by d:
kb+a∣ka+b
Now, we need to show that kb+a∣ka+b. Consider the expression:
ka+b=(kb+a)⋅q+r
where q is the quotient and r is the remainder. Since kb+a∣ka+b, the remainder r must be zero. Therefore:
ka+b=(kb+a)⋅q
Rearranging, we get:
ka+b−(kb+a)⋅q=0
Simplifying further:
ka+b−kbq−aq=0
ka+b=q(kb+a)
Since gcd(a,b)=1, the only way this can hold is if q=1 and kb+a=ka+b. This implies:
kb+a=ka+b
(k−1)b=(k−1)a
b=a
Therefore, n=db and m=da imply n∣m.
To find all nice numbers, we need to check the condition k>2. If k>2, then we choose a=2k−1 and b=k−2:
kb+a=k(k−2)+(2k−1)=k2−2k+2k−1=k2−1
k2−1∣k2−1
k−2∣2k−1
k−2∣3
k∈{3,5}
Therefore, the nice numbers are 2,3,5.
The final answer is 2,3,5.