Maths Olympiad Prep

Track / Stage 7 / 217 of 300 #1617 of 1964

Problem 1617

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+mkm+nkn + m | km + n we have nmn | 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.

Official solution

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

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

Let's start by substituting k=5 k = 5 :
5n+m5m+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)+da5(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+a5a+b 5b + a \mid 5a + b

Now, we need to show that 5b+a5a+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+a5a+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+b5bqaq=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 nmn \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+mkm+nkn + m \mid km + n, we have nmn \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+mkm+nkn + m \mid km + n, we need to show that nmn \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)+dak(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+aka+b kb + a \mid ka + b

Now, we need to show that kb+aka+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+aka+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+bkbqaq=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
(k1)b=(k1)a (k-1)b = (k-1)a
b=a b = a

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

To find all nice numbers, we need to check the condition k>2k > 2. If k>2k > 2, then we choose a=2k1a = 2k - 1 and b=k2b = k - 2:
kb+a=k(k2)+(2k1)=k22k+2k1=k21 kb + a = k(k-2) + (2k-1) = k^2 - 2k + 2k - 1 = k^2 - 1
k21k21 k^2 - 1 \mid k^2 - 1
k22k1 k - 2 \mid 2k - 1
k23 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 and solution reproduced as published; topic, difficulty and ordering added by this site.