JBMO 2022 Solutions
JBMO 2022 Solutions
JBMO 2022 Solutions
11ab ≤ a3 − b3 ≤ 12ab.
Since
We can not have t ≥ 4 since in that case t3 ≤ (12 − 3t)b(b + t) is not satisfied as the right
hand side is not positive. Therefore it remains to check the cases when t ∈ {1, 2, 3}.
If t = 3, the above condition becomes
If b ≥ 3, the left hand side is greater than 27 and if b = 1 the right hand side is smaller than
27 so there are no solutions in these cases. If b = 2, we get a solution (a, b) = (5, 2).
If t ≤ 2, we have
Solution 2. First, from a3 − b3 ≥ 11ab > 0 it follows that a > b, implying that a − b ≥ 1.
Note that
Therefore 12ab ≥ a3 − b3 > 3ab(a − b), which implies that a − b < 4 so a − b ∈ {1, 2, 3}. We
discuss three possible cases:
1
• a−b=1
After replacing a = b + 1, the condition a3 − b3 ≥ 11ab reduces to 1 ≥ 8b2 + 8b, which
is not satisfied for any positive integer b.
• a−b=2
After replacing a = b + 2, the condition a3 − b3 ≥ 11ab reduces to 8 ≥ 5b2 + 10b, which
is also not satisfied for any positive integer b.
• a−b=3
After replacing a = b + 3, the condition a3 − b3 ≥ 11ab reduces to 27 ≥ 2b2 + 6b. The
last inequality holds true only for b = 1 and b = 2. For b = 1 we get a = 4 and for
b = 2 we get a = 5. Direct verification shows that a3 − b3 ≤ 12ab is satisfied only for
(a, b) = (5, 2).
In summary, (a, b) = (5, 2) is the only pair of positive integers satisfying all conditions of the
problem.
2
Problem 2. Let ABC be an acute triangle such that AH = HD, where H is the
orthocenter of ABC and D ∈ BC is the foot of the altitude from the vertex A. Let ℓ
denote the line through H which is tangent to the circumcircle of the triangle BHC.
Let S and T be the intersection points of ℓ with AB and AC, respectively. Denote the
midpoints of BH and CH by M and N , respectively. Prove that the lines SM and
T N are parallel.
Solution 1. In order to prove that SM and T N are parallel, it suffices to prove that both
of them are perpendicular to ST . Due to symmetry, we will provide a detailed proof of
SM ⊥ ST , whereas the proof of T N ⊥ ST is analogous. In this solution we will use the
following notation: ∠BAC = α, ∠ABC = β, ∠ACB = γ.
3
Since AH = HD, H is the midpoint of AD. If K denotes the midpoint of AB, we have
that KH and BC are parallel. Since M is the midpoint of BH, the lines KM and AD
are parallel, from which it follows that KM is perpendicular to BC. As KH and BC are
parallel, we have that KM is perpendicular to KH so ∠M KH = 90◦ . Using the parallel
lines KH and BC we also have
Now,
Solution 2. We will refer to the same figure as in the first solution. Since CH is tangent
to the circumcircle of triangle BHC, we have
From the above it follows that triangles AHB and HSB are similar. If K denotes the
midpoint of AB, then triangles AHK and HSM are also similar. Now, observe that H and
K are respectively the midpoints of AD and AB, which implies that HK ∥ DB, so
Now, from the last observation and the similarity of triangles AHK and HSM , it follows
that
∠HSM = ∠AHK = 90◦ .
Due to symmetry, analogously as above, we can prove that ∠HT N = 90◦ , implying that
both SM and T N are perpendicular to T S, hence they are parallel.
4
Problem 3. Find all quadruples of positive integers (p, q, a, b), where p and q are
prime numbers and a > 1, such that
pa = 1 + 5q b .
Solution 1. First of all, observe that if p, q are both odd, then the left hand side of the
given equation is odd and the right hand side is even so there are no solutions in this case.
In other words, one of these numbers has to be equal to 2 so we can discuss the following
two cases:
• p=2
In this case the given equation becomes
2a = 1 + 5 · q b .
Note that q has to be odd. In addition, 2a ≡ 1 (mod 5). It can be easily shown that
the last equation holds if and only if a = 4c, for some positive integer c. Now, our
equation becomes 24c − 1 = 5 · q b , which can be written into its equivalent form
(4c − 1)(4c + 1) = 5 · q b .
Since q is odd, it can not divide both 4c − 1 and 4c + 1. Namely, if it divides both
of these numbers then it also divides their difference, which is equal to 2, and this is
clearly impossible. Therefore, we have that either q b |4c − 1 or q b |4c + 1, which implies
that one of the numbers 4c − 1 and 4c + 1 divides 5. Since for c ≥ 2 both of these
numbers are greater than 5, we only need to discuss the case c = 1. But in this
case 5 · q b = 15, which is obviously satisfied only for b = 1 and q = 3. In summary,
(p, q, a, b) = (2, 3, 4, 1) is the only solution in this case.
• q=2
In this case obviously p must be an odd number and the given equation becomes
pa = 1 + 5 · 2b .
First, assume that b is even. Then 2b ≡ 1 (mod 3), which implies that 1 + 5 · 2b is
divisible by 3, hence 3 | pa so p must be equal to 3 and our equation becomes
3a = 1 + 5 · 2b .
From here it follows that 3a ≡ 1 (mod 5), which implies that a = 4c, for some positive
integer c. Then the equation 3a = 1 + 5 · 2b can be written into its equivalent form
32c − 1 32c + 1
· = 5 · 2b−2 .
2 2
5
2c
Observe now that 32c ≡ 1 (mod 4) from where it follows that 3 2+1 ≡ 1 (mod 2). From
2c
here we can conclude that the number is 3 2+1 is relatively prime to 2b−2 , so it has to
2c
divide 5. Clearly, this is possible only for c = 1 since for c > 1 we have 3 2+1 > 5. For
c = 1, we easily find b = 4, which yields the solution (p, q, a, b) = (3, 2, 4, 4).
Next, we discuss the case when b is odd. In this case,
pa = 1 + 5 · 2b ≡ 1 + 5 · 2 ≡ 2 (mod 3).
The last equation implies that a must be odd. Namely, if a is even then we can not
have pa ≡ 2 (mod 3) regardless of the value of p. Combined with the condition a > 1,
we conclude that a ≥ 3. The equation pa = 1 + 5 · 2b can be written as
5 · 2b = pa − 1 = (p − 1) pa−1 + pa−2 + · · · + 1 .
Observe that
pa−1 + pa−2 + · · · + 1 ≡ 1 + 1 + · · · + 1 = a ≡ 1 (mod 2),
so this number is relatively prime to 2b , which means that it has to divide 5. But this
is impossible, since a ≥ 3 and p ≥ 3 imply that
pa−1 + pa−2 + · · · + 1 ≥ p2 + p + 1 ≥ 32 + 3 + 1 = 13 > 5.
In other words, there are no solutions when q = 2 and b is an even number.
In summary, (a, b, p, q) = (4, 4, 3, 2) and (a, b, p, q) = (4, 1, 2, 3) are the only solutions.
Solution 2. Analogously as in the first solution we conclude that at least one of the numbers
p and q has to be even. Since these numbers are prime, this implies that at least one of p
and q must be equal to 2. Therefore it is sufficient to discuss the following two cases:
• p=2
In this case the given equation then becomes
2a = 1 + 5 · q b .
From here, it follows that q is an odd number. In addition, 2a ≡ 1 (mod 5), which
implies that a = 4c, for some positive integer c. Then the above equation can be
written in its equivalent form
(2c − 1) (2c + 1) 22c + 1 = 5 · q b .
Since 2c − 1, 2c and 2c + 1 are three consecutive integers, one of them must be divisible
by 3. Clearly it is not 2c implying that one of the numbers 2c − 1 and 2c + 1 is divisible
by 3. This implies that 3 | (2c − 1) (2c + 1) (22c + 1) so 3 | 5 · q b , hence q must be equal
to 3 and we are left with solving the equation
(2c − 1) (2c + 1) 22c + 1 = 5 · 3b .
Note that 22c + 1 ≡ 2 (mod 3) so from the above equation it follows that 22c + 1
must be equal to 5, which implies that c = 1. For c = 1 we have b = 1, so we get
(a, b, p, q) = (4, 1, 2, 3) as the only solution in this case.
6
• q=2
In this case the given equation becomes
pa = 1 + 5 · 2b
so clearly p must be an odd number.
If a is odd then we have
5 · 2b = (p − 1) pa−1 + pa−2 + · · · + p + 1 .
The second bracket on the right hand side is sum of a odd numbers so it is an odd
number. Due to the condition a > 1 we must have a ≥ 3. But then
so we do not have solutions in this case. Therefore it remains to discuss the case when
a is even.
Let a = 2c for some positive integer c. Then we have the following equation
(pc − 1) (pc + 1) = 5 · 2b .
Note that pc − 1 and pc + 1 are two consecutive even numbers so one of them is
divisible by 2 but not by 4. Looking into the right hand side of the above equation,
we conclude that this number must be equal to either 2 or 5 · 2 = 10. In other words,
either pc − 1 ∈ {2, 10} or pc + 1 ∈ {2, 10} yielding the following possible values for pc :
1, 3, 9, 11. Clearly pc = 1 is impossible, whereas pc = 3 implies that (pc − 1) (pc + 1) is
not divisible by 5 so there are no solutions if pc = 3. Similarly, for pc = 11 we have
that (pc − 1) (pc + 1) is divisible by 3 so it can not be equal to 5 · 2b for any positive
integer b. Finally, if pc = 9, we have solution (a, b, p, q) = (4, 4, 3, 2).
In summary, (a, b, p, q) = (4, 4, 3, 2) and (a, b, p, q) = (4, 1, 2, 3) are the only solutions.
7
Problem 4. We call an even positive integer n nice if the set {1, 2, . . . , n} can be
partitioned into n2 two-element subsets, such that the sum of the elements in each
subset is a power of 3. For example, 6 is nice, because the set {1, 2, 3, 4, 5, 6} can be
partitioned into subsets {1, 2}, {3, 6}, {4, 5}. Find the number of nice positive integers
which are smaller than 32022 .
Solution. For a nice number n and a given partition of the set {1, 2, . . . , n} into two-
element subsets such that the sum of the elements in each subset is a power of 3, we say
that a, b ∈ {1, 2, . . . , n} are paired if both of them belong to the same subset.
Let x be a nice number and k be a (unique) non-negative integer such that 3k ≤ x < 3k+1 .
Suppose that x is paired with y < x. Then, x + y = 3s , for some positive integer s. Since
x + y ≥ 3k + 1 > 3k
implies that s > k. From these we conclude that s must be equal to k + 1, so x + y = 3k+1 .
k+1
The last equation, combined with x > y, implies that x > 3 2 .
Similarly as above, we can conclude that each number z from the closed interval 3k+1 − x, x
is paired with 3k+1 − z. Namely, for any such z, the larger of the numbers z and 3k+1 − z is
k+1
greater than 3 2 which is greater than 3k , so the numbers z and 3k+1 − z must necessarily
be in the same subset. In other words, each number from the interval 3k+1 − x, x is paired
with another number from this interval. Note that this implies that all numbers smaller than
3k+1 − x are paired among themselves, so the number 3k+1 − x − 1 is either nice or equals
zero. Also, the number 3k must be paired with 2 · 3k , so x ≥ 2 · 3k .
Finally, we prove by induction that an = 2n − 1, where an is the number of nice positive
integers smaller than 3n . For n = 1, the claim is obviously true, because 2 is the only nice
positive integer smaller than 3. Now, assume that an = 2n − 1 for some positive integer n.
We will prove that an+1 = 2n+1 − 1. To prove this, first observe that the number of nice
positive integers between 2 · 3n and 3n+1 is exactly an+1 − an . Next, observe that 3n+1 − 1
is nice. For every nice number 2 · 3n ≤ x < 3n+1 − 1, the number 3n+1 − x − 1 is also nice
and is strictly smaller than 3n . Also, for every positive integer y < 3n , obviously there is a
unique number x such that 2 · 3n ≤ x < 3n+1 − 1 and 3n+1 − x − 1 = y. Thus,