29th Junior Balkan
Mathematical Olympiad
Problems with Solutions
Problem 1
For all positive real numbers a, b, c, prove that
(a2 + bc)2 (b2 + ca)2 (c2 + ab)2 2abc(a + b + c)2
+ + ≥ .
b+c c+a a+b ab + bc + ca
Solutions
Solution 1. Apply Cauchy-Schwarz inequality.
!
(a2 + bc)2 (b2 + ca)2 (c2 + ab)2
((b + c) + (c + a) + (a + b)) + + ≥
b+c c+a a+b
2
a2 + b2 + c2 + ab + bc + ca
Lemma. 3(a2 + b2 + c2 + ab + bc + ca) ≥ 2(a + b + c)2 .
Proof.
3(a2 + b2 + c2 + ab + bc + ca) =
2(a2 + b2 + c2 + 2ab + 2bc + 2ca) + (a2 + b2 + c2 − ab − bc − ca) =
1 1 1
2(a + b + c)2 + (a − b)2 + (b − c)2 + (c − a)2 ≥ 2(a + b + c)2 ,
2 2 2
as desired. ⋄
Then we have
4
(a2 + bc)2 (b2 + ca)2 (c2 + ab)2 (a + b + c)4 2
+ + ≥ 9 = (a + b + c)3 .
b+c c+a a+b 2(a + b + c) 9
Again by Cauchy-Schwarz inequality we have
1 1 1
(a + b + c) + + ≥ 9.
a b c
Finally, using these we get
(a2 + bc)2 (b2 + ca)2 (c2 + ab)2 2 2(a + b + c)2 2abc(a + b + c)2
+ + ≥ (a + b + c)3 ≥ 1 1 1 = ,
b+c c+a a+b 9 a + b + c
ab + bc + ca
as desired.
Solution 2. By using AM-GM we have:
√ 2
X (a2 + bc)2 X 2 a2 bc X a
≥ = 4abc .
cyc b+c cyc b+c cyc b+c
From here, by using Titu’s Lemma, we obtain
X a X a2
4abc = 4abc ≥
cyc b+c cyc ab + ac
(a + b + c)2 2abc(a + b + c)2
4abc = ,
2(ab + bc + ca) ab + bc + ca
as desired.
Solution 3. Using Titu’s Lemma and Schur’s Inequality, we have
X a2 + bc 2 X a3 + abc 2 Titu
P 3 2
a + 3abc
= 2
≥ P 2 ≥
cyc b+c cyc a (b + c) a (b + c)
Schur X
≥ a2 (b + c).
cyc
Using the inequality (ab + bc + ca)2 ≥ 3abc(a + b + c), we get:
X 3abc(a + b + c)
a2 (b + c) = −3abc + (a + b + c)(ab + bc + ca) ≥ −3abc + (a + b + c) .
cyc ab + bc + ca
Finally, by (a + b + c)2 ≥ 3(ab + bc + ca):
3abc(a + b + c)
− 3abc + (a + b + c) =
ab + bc + ca !
(a + b + c)2 2abc(a + b + c)2 2abc(a + b + c)2
abc −3 + + ≥
ab + bc + ca ab + bc + ca ab + bc + ca
2
Problem 2
Determine all numbers of the form
20252025 . . . 2025
(where the block 2025 is repeated one or more times) that are perfect squares of positive integers.
Solution
We will prove that the only solution is 2025 = 452 .
First, observe that the given number is equal to
2025 1 + 104 + 108 + . . . + 104(n−1)
for some n ∈ N. Since 2025 is a perfect square, it must hold that 1 + 104 + 108 + . . . + 104(n−1) = x2
(⋆) for some x ∈ N. Multiplying both sides by 104 − 1 yields
104n − 1 = 9999x2 = 11 · 101 · (3x)2
Applying the difference of squares twice gives
(10n − 1)(10n + 1)(102n + 1) = 11 · 101 · (3x)2 (⋆⋆)
Using the Euclidean algorithm, we see that 10n − 1 and 10n + 1 are coprime (their difference is 2 and they
are both odd). Additionaly, 102n + 1 is coprime with both 10n − 1 and 10n + 1 since it is coprime with
their product 102n − 1 (same reasoning as before). Hence, all three factors on the left-hand side of (⋆⋆)
are pairwise coprime. Since the numbers 11 and 101 are prime, at least one of the factors on the left-hand
side of (⋆⋆) must be a perfect square.
Lemma 1. The equation 10n + 1 = m2 has no solutions in the set of positive integers.
Proof. Reducing modulo 3 implies m2 ≡ 2 (mod 3), which cannot hold.
Hence, neither 102n + 1 nor 10n + 1 can be perfect squares.
Lemma 2. The only solution to the equation 10n −1 = m2 in the set of positive integers is (n, m) = (1, 3).
Proof. Consider the equation modulo 4. For n ⩾ 2, 10n ≡ 0 (mod 4), hence the right-hand side is
congruent to 3 modulo 4. On the other hand, n = 1 gives m = 3 as a solution.
Lemmas 1 and 2 imply that the only solution to the given equation is (n, x) = (1, 1). Therefore, the only
solution is the number 2025.
Problem 3. Let △ABC be right-angled at A and let D be the foot of altitude from A to BC and let
E be the midpoint of DC. The circumcircle of △ABD intersects AE again at point F . Let X be the
intersection of AB and DF . Prove that XD = XC.
Solution 1. Since E is the midpoint of DC, it is sufficient to show that XE ⊥ DC which is equivalent
to proving that XE ∥ AD. Let H be the intersection of BF and AD. Since ∠ADB = 90◦ ⇒ ∠AF B =
90◦ ⇒ H is the orthocenter of △ABE ⇒ EH ⊥ AB ⇒ EH ∥ AC. Since E is the midpoint of DC
we have that H is also the midpoint of AD. Apply (unoriented) Menelaus theorem in △ABH for points
D, F, X and in △BHD for points A, F, E. We get that
AX BF HD DE BF HA
=1= .
XB F H DA EB F H AD
AX DE
Since we have that AH = HD the ratios cancel and we get that XB = EB which implies that AD ∥ XE
by Thales.
Solution 2. Let M be the midpoint of AC. As midsegment in △ADC, M E ∥ AD. Also, by Thales’
Theorem in the right △ADC, we get M A = M D = M C.
Claim 1. DF M E is cyclic. ...(1)
(ABDF ) AD∥M E
Proof 1. ∠DF E = ∠DBA = 90◦ − ∠DCA = ∠DAC = ∠EM C = ∠DM E, so DF M E is
cyclic. ⋄
Proof 2. First we prove that M D is tangent to (ABDF ). Let O be the midpoint of AB and therefore
center of (ABDF ). Then, OA = OD, so by criterion SSS, we get △OAM ∼ = △ODM , thus ∠ODM =
∠OAM = 90◦ .
M E∥AD
Now, ∠M EF = ∠F AD = ∠M DF , so DF M E is cyclic. ⋄
4
Claim 2. X, M, E are collinear.
(1)
Proof 1. ∠M F X = ∠M ED = 90◦ = ∠M AX, so M F AX is cyclic. ...(2)
(2) (1)
∠XM A = ∠XF A = ∠DF E = ∠DM E = ∠CM E and since A, M, C are collinear, so are X, M, E. ⋄
Proof 2. Same as in Proof 1, M F AX is cyclic.
(2) (ABDF ) (1)
∠XM F = ∠F AB = ∠F DE = 180◦ − ∠F M E, so ∠XM E = 180◦ . ⋄
Proof 3. ∠M AB + ∠M EB = 90◦ + 90◦ = 180◦ , so M ABE is cyclic. The three pairwise radical axes
of the circles (M ABE), (ABDF ) and (DF M E) are AB, DF and M E. Then X = AB ∩ DF is their
radical center, so X ∈ M E. ⋄
Now, X, M, E are collinear, i.e. X lies on the side bisector of DC, so XD = XC.
Solution 3. Let Y be the intersection of the side bisector of DC with line AB. Then, Y D = Y C
and therefore ∠Y DC = ∠Y CD. Also, ∠Y EC = 90◦ = ∠Y AC, so Y AEC is cyclic. From there,
∠BAE = ∠Y CE ≡ ∠Y CD = ∠Y DC.
On the other hand, from (ABDF ), ∠F DC = ∠BAF ≡ ∠BAE.
Therefore, ∠Y DC = ∠BAE = ∠F DC, thus points D, F, Y are collinear, i.e. Y ∈ DF . Since X =
AB ∩ DF , we get Y ≡ X, and therefore XD = XC.
5
Problem 4.
Let n be a positive integer. The integers from 1 to n are written in the cells of an n × n table (one integer
per cell) so that each of them appears exactly once in each row and exactly once in each column. Denote
by ri the number of pairs (a, b) of numbers in the ith row (1 ≤ i ≤ n), such that a > b, but a is written
to the left of b (not necessarily next to it). Denote by cj the number of pairs (a, b) of numbers in the j th
column (1 ≤ j ≤ n), such that a > b, but a is written above b (not necessarily next to it). Determine the
largest possible value of the sum
r1 + r2 + · · · + rn + c1 + c2 + · · · + cn .
Note: In the n × n table we label the rows 1 to n from top to bottom, and we label the columns 1 to n
from left to right.
Solution
n(n − 1)(2n − 1)
Answer:
3
Suppose x is in position i in some row/column. Then after it there could be at most min(n − i, x − 1)
smaller numbers. Having in mind that this bound is separately for the row of x and for the column of x,
as well as that i is different for the different appearances of x (as no row/column has a number appearing
more than once, by the problem condition), we deduce that the contribution of x to the overall sum is at
most
n
X n
X n−x
X x−1
X
2 min(n − i, x − 1) = 2 (n − i) + 2 (x − 1) = 2 i + 2(n − x)(x − 1)
i=1 i=n−x+1 i=1 i=0
= x(x − 1) + 2(n − x)(x − 1) = (2n − x)(x − 1).
Summing through x = 1, . . . , n now gives the following upper bound for the sum:
n
X n
X n
X n
X
(2n − x)(x − 1) = (2n + 1) x− x2 − 2n
x=1 x=1 x=1 x=1
n(n + 1)(2n + 1) n(n + 1)(2n + 1) n(n − 1)(2n − 1)
= − − 2n2 = .
2 6 3
Equality holds e.g. for the table in which the s-th row is n + 1 − s, n − s, . . . , 1, n, n − 1, . . . , n + 2 − s,
since for each x in position i in a row or column there are indeed exactly min(n − i, x − 1) smaller numbers
after it.