Maths Olympiad Prep

Track / Stage 7 / 235 of 300 #1635 of 1964

Problem 1635

National Olympiad second round; IMO P1/P4
Number theory Difficulty 7.4 Find the answer

A positive integer k>1k > 1 is called nice if for any pair (m,n)(m, n) of positive integers satisfying the condition kn+m∣km+nkn + m | km + n we have n∣mn | m.
1. Prove that 55 is a nice number.
2. Find all the nice numbers.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Next problem →

Official solution

1. **Prove that 55 is a nice number.**

Given: kn+m∣km+n kn + m \mid km + n for k=5 k = 5 , we need to show that n∣m n \mid m .

Let's start by substituting k=5 k = 5 :
5n+m∣5m+n 5n + m \mid 5m + n

Suppose gcd⁡(m,n)=d\gcd(m, n) = d, then we can write m=da m = da and n=db n = db where gcd⁡(a,b)=1\gcd(a, b) = 1. Substituting these into the divisibility condition, we get:
5(db)+da∣5(da)+db 5(db) + da \mid 5(da) + db
Simplifying, we have:
d(5b+a)∣d(5a+b) d(5b + a) \mid d(5a + b)
Since dd is a common factor, we can divide both sides by dd:
5b+a∣5a+b 5b + a \mid 5a + b

Now, we need to show that 5b+a∣5a+b5b + a \mid 5a + b. Consider the expression:
5a+b=(5b+a)⋅q+r 5a + b = (5b + a) \cdot q + r
where qq is the quotient and rr is the remainder. Since 5b+a∣5a+b5b + a \mid 5a + b, the remainder rr must be zero. Therefore:
5a+b=(5b+a)⋅q 5a + b = (5b + a) \cdot q

Rearranging, we get:
5a+b−(5b+a)⋅q=0 5a + b - (5b + a) \cdot q = 0
Simplifying further:
5a+b−5bq−aq=0 5a + b - 5bq - aq = 0
5a+b=5bq+aq 5a + b = 5bq + aq
5a+b=q(5b+a) 5a + b = q(5b + a)

Since gcd⁡(a,b)=1\gcd(a, b) = 1, the only way this can hold is if q=1q = 1 and 5b+a=5a+b5b + a = 5a + b. This implies:
5b+a=5a+b 5b + a = 5a + b
4b=4a 4b = 4a
b=a b = a

Therefore, n=dbn = db and m=dam = da imply n∣mn \mid m.

2. Find all the nice numbers.

We need to find all kk such that for any pair (m,n)(m, n) of positive integers satisfying kn+m∣km+nkn + m \mid km + n, we have n∣mn \mid m.

From the previous part, we know that k=5k = 5 is a nice number. Let's generalize this for any kk.

Given kn+m∣km+nkn + m \mid km + n, we need to show that n∣mn \mid m.

Suppose gcd⁡(m,n)=d\gcd(m, n) = d, then m=dam = da and n=dbn = db where gcd⁡(a,b)=1\gcd(a, b) = 1. Substituting these into the divisibility condition, we get:
k(db)+da∣k(da)+db k(db) + da \mid k(da) + db
Simplifying, we have:
d(kb+a)∣d(ka+b) d(kb + a) \mid d(ka + b)
Since dd is a common factor, we can divide both sides by dd:
kb+a∣ka+b kb + a \mid ka + b

Now, we need to show that kb+a∣ka+bkb + a \mid ka + b. Consider the expression:
ka+b=(kb+a)⋅q+r ka + b = (kb + a) \cdot q + r
where qq is the quotient and rr is the remainder. Since kb+a∣ka+bkb + a \mid ka + b, the remainder rr must be zero. Therefore:
ka+b=(kb+a)⋅q ka + b = (kb + a) \cdot q

Rearranging, we get:
ka+b−(kb+a)⋅q=0 ka + b - (kb + a) \cdot q = 0
Simplifying further:
ka+b−kbq−aq=0 ka + b - kbq - aq = 0
ka+b=q(kb+a) ka + b = q(kb + a)

Since gcd⁡(a,b)=1\gcd(a, b) = 1, the only way this can hold is if q=1q = 1 and kb+a=ka+bkb + a = ka + b. This implies:
kb+a=ka+b kb + a = ka + b
(k−1)b=(k−1)a (k-1)b = (k-1)a
b=a b = a

Therefore, n=dbn = db and m=dam = da imply n∣mn \mid m.

To find all nice numbers, we need to check the condition k>2k > 2. If k>2k > 2, then we choose a=2k−1a = 2k - 1 and b=k−2b = k - 2:
kb+a=k(k−2)+(2k−1)=k2−2k+2k−1=k2−1 kb + a = k(k-2) + (2k-1) = k^2 - 2k + 2k - 1 = k^2 - 1
k2−1∣k2−1 k^2 - 1 \mid k^2 - 1
k−2∣2k−1 k - 2 \mid 2k - 1
k−2∣3 k - 2 \mid 3
k∈{3,5} k \in \{3, 5\}

Therefore, the nice numbers are 2,3,52, 3, 5.

The final answer is 2,3,5 \boxed{ 2, 3, 5 } .

Source: NuminaMath-1.5, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.