Professional Documents
Culture Documents
Aharshi Roy
17 August 2023
Contents
1 Algebra 3
1.1 Standard Functional Equations . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1 Canada National Olympiad 2002/5 . . . . . . . . . . . . . . . . . . 3
1.1.2 Baltic Way 2010/5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3 IMO 2009/5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.4 USEMO 2020/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.5 USAJMO 2019/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.6 Balkan Mathematical Olympiad 2013/3 . . . . . . . . . . . . . . . 8
1.1.7 Irish National Olympiad 1991/2/4 . . . . . . . . . . . . . . . . . . 9
1.1.8 Gauss Mathematical Olympiad 2022/4 . . . . . . . . . . . . . . . . 11
1.1.9 Infinity Dots JMO 2019/1 . . . . . . . . . . . . . . . . . . . . . . . 12
1.1.10 IMOSL 2011/A3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.1.11 Balkan Mathematical Olympiad 2023/1 . . . . . . . . . . . . . . . 14
1.1.12 APMO 2023/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.1.13 IMO 2011/5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.1.14 Japan TST 2022/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.1.15 IMOSL 2015/A2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.1.16 RMM SL 2019/A1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.1.17 Japan Mathematical Olympiad Finals 2021/1 . . . . . . . . . . . . 21
1.2 Wrapped Functional Equations . . . . . . . . . . . . . . . . . . . . . . . . 22
1.2.1 Baltic Way 2014/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.2.2 IMO 2010/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.3 Monster Functional Equations . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.3.1 PAMO 2018/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.3.2 IZhO 2017/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.3.3 PFTB 4.20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 Combinatorics 28
2.0.1 ELMO 2022/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.0.2 India TST 2016/3/3 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.0.3 PAGMO 2022/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.0.4 Italy Mathematical Olympiad 2023/2 . . . . . . . . . . . . . . . . 31
2.0.5 C-UnS-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.0.6 IMO 2022/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1
Random Olympiad Problems updated 17 August 2023
3 Number Theory 34
3.1 Constructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.1.1 IMOSL 2007/N2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.1.2 USMCA 2019/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.2 Exponential NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.1 USAJMO 2011/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.2 IMO 1999/4 (harder version) . . . . . . . . . . . . . . . . . . . . . 37
3.2.3 IMO 1990/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2.4 IMOSL 2022/N2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2.5 N-UnS-1 (China) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2.6 China National Mathematical Olympiad 2009/2 . . . . . . . . . . 41
3.2.7 IMOSL 2006/N5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.2.8 Mordell’s Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2.9 N-UnS-2 (AMM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.2.10 N-UnS-3 (Pixton) . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.2.11 China TST 2006/1/2 . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2
Random Olympiad Problems updated 17 August 2023
§1 Algebra
§1.1 Standard Functional Equations
§1.1.1 Canada National Olympiad 2002/5
Problem statement
3
Random Olympiad Problems updated 17 August 2023
Problem statement
Then by P (x, 0), we get f (x2 ) = xf (x) = −xf (−x), which means f is odd.
Now finally by P (x, −x) we get f (x) = 0 or −x for each x ∈ R.
Now the most fun part about any FE for an insane person: POINT WISE TRAP!!!!
This part is just case bashing since we can assume for some non-zero a ̸= b, we have
f (a) = −a and f (b) = 0 and then by P (a, b) and P (b, a), we will get a contradiction.
One can easily verify both f (x) ≡ −x and f (x) ≡ 0, are solutions.
4
Random Olympiad Problems updated 17 August 2023
Problem statement
Find all functions f : N → N such that for all positive integers x, y we have the
numbers x, f (y), f (y + f (x) − 1) are the sides of a non-degenerate triangle.
Let P (x, y) denote the statement. Also say that a ⇀ b ⇀ c if and only if a non-degenerate
triangle has side lengths a, b, c.
P (1, y) → 1 ⇀ f (y) ⇀ f (y + f (1) − 1) ⇐⇒ f (y) = f (y + f (1) − 1), now if f (1) ̸= 1, then
f is bounded and by picking a large enough x, in P (x, y) gives us an easy contradiction,
hence assume f (1) = 1.
Then by P (x, 1) we get f (f (x)) = x and so f is bijective also.
Now let f (2) = a ⇐⇒ f (a) = 2. Then by P (2, y) we get 2 ⇀ f (y) ⇀ f (a + y − 1) ⇐⇒
|f (y) − f (a + y − 1)| = 1 (see that this is since a ̸= 1 obviously).
Now look at the sequence {f (a), f (2a − 1), f (3a − 2), f (4a − 3), . . . } and by our previous
observation we get the absolute difference between any two consecutive terms of this
infinite sequence is 1. Now using this fact and that f is bijective with a ̸= 1, we get
f (ka − (k − 1)) = k + 1 ⇐⇒ f (k + 1) = ka − k + 1 for all k ≥ 1 and combining with the
fact f (1) = 1, we get f is linear. Now one can just verify easily that the only function
which works is the identity function.
Hence the only working function is f (x) ≡ x ∀ x ∈ N .
5
Random Olympiad Problems updated 17 August 2023
Problem statement
for all positive real numbers x and y. Prove that f (x) = x for all positive real
numbers x.
Proof. If for some c we have c > f (c), then by P ( c−fc (c) , c) we get f (c) · c−f (c)
c = 0, a
contradiction. □
Now define a function g : R>0 → R≥0 such that f (x) = x + g(x) for all positive x. And
so we rewrite the original equation as
Claim — If for some a ̸= b we have g(a) = g(b) then it implies g(a) = g(b) = 0.
Proof. Because of the amazing symmetry in the rewritten equation, we get by Q(a, b)
and Q(b, a) that (a − 1)g(b) = (b − 1)g(a) ⇐⇒ g(a) = g(b) = 0 (since a ̸= b). □
And so by Q(1, x) and the previous claim, we obtain that g(x) = 0 for all x > 1. And
then picking any constant x0 > 1, we get by P (x0 , y) that (x0 − 1)g(y) = 0 ⇐⇒ g(y) =
0 ⇐⇒ f (y) = y. ■
6
Random Olympiad Problems updated 17 August 2023
Problem statement
Proof. We begin by proving first that {g(0), g(1), . . . g(a − 1)} are all distinct modulo b.
Assume the contrary and so let 0 ≤ i, j ≤ a−1 where i ̸= j and g(i) = nb+r, g(j) = mb+r
(obviously n ≠ m). And then we get g(i + (m − n)a) = g(i) + (m − n)b = g(j) ⇐⇒
i + (m − n)a = j, but because 0 ≤ i, j ≤ a − 1, it implies m = n, a contradiction. And so
we get |a| ≤ |b|.
And then similarly we can consider the sequence of numbers {f (0), f (1), . . . , f (b − 1)}
modulo a and get that |b| ≤ |a|.
And so all in all, we have |a| = |b|. □
Hence in conclusion the only pairs which work are (a, b) = (k, ±k) where k ∈ Z (one
can see they obviously work since one can take f ≡ x + k, g ≡ x when a = b and take
f ≡ k − x, g ≡ −x when a = −b).
7
Random Olympiad Problems updated 17 August 2023
Problem statement
3
Find all functions f : (R+ ) → R+ such that we have
(iii) f (1, k, k + 1) = k + 1
for all x, y, z, k ∈ R+ .
Let P (x, y, z); Q(x, y, z, k); and R(k) denote the assertions of the first, second and third
statement respectively.
8
Random Olympiad Problems updated 17 August 2023
Problem statement
Let A(x) and B(x) denote the assertion to the two conditions given int the problem
statement, respectively.
x
We claim the only function which works is f (x) ≡ ∀ x ∈ Q+ . The verification is
x+1
trivial. Now we prove that this is the only function which works.
It is equivalent to prove that f pq = p+qp
for all relatively prime integers p and q.
Because of the second condition we only need to prove it for p < q.
We will induct on p + q = K.
¶ Base Case: K = 2, 3
B(1) → f (1) = 21 ; A(1), B(2) → f 12 = 13 .
¶ Inductive Step
Assume it is true for all K ≤ 2K0 − 1. We will prove our claim for 2K0 , 2K0 + 1.
Subcase A: Proof
of 2K
0
p p p
A 2K0 −2p → 2f 2K0 −p = 2K0 .
Define a cycle of 2K0 + 1 to be: take a number p0 which satisfies the previously listed
properties (basically it is nice), then multiply p0 with the highest power of 2 such that the
new number does not exceed 2K0 + 1 and then take the complement of the new number
and repeat the process. Call the numbers which you get by taking the complement (and
p0 ) to be the complementary numbers; and the numbers which you get by multiplying
the complementary numbers with a power of two be the exponential numbers. Keep
repeating the process until you get a complementary number which is already in the
cycle for the first time again, this is when the cycle stops (obviously the cycle must end
at some point).
Obviously see that since we started with a relatively prime number to 2K0 + 1, all the
number are relatively prime to it as well and all complement are obviously odd since the
exponent of 2 we are multiplying the complement must be atleast 1 (you can see trivially
why).
9
Random Olympiad Problems updated 17 August 2023
Claim — A cycle must end by getting the first complementary number (a.k.a p0 )
back.
Proof. This is because you can assume the contrary and then obviously the last number
of the cycle (which is an exponential number), maps back to the second of higher
complementary number in the cycle (call it N ), but then we can trace back and get
the second last exponential number maps to the complementary number before N , a
contradiction to the definition of a cycle. □
And obviously all the complementary numbers in a cycle are nice. Consider a cycle
non-distinct upto rotation. Also obviously hence all nice numbers must be in one and
only one cycle.
For example the cycles of 2K0 + 1 are (1 → 32); (5 → 20, 13 → 26, 7 → 28). And
for 2K0 + 1 = 37, we have: (1 → 32, 5 → 20, 17 → 34, 3 → 24, 13 → 26, 11 → 22, 15 →
30, 7 → 28, 9 → 36).
J
Now comes the moment of truth, why we did this: by and the second condition
given
in the problem, this falls right in our trap; for example if we want to find out
5
f 28 , then using the cycles of 33, we get
5 1 20 1 13 1 1 26 1 1 7
f = ·f = · 1−f = · 1− ·f = · 1− · 1−f
28 4 13 4 20 4 2 7 4 2 26
1 1 1 28 1 1 1 5
= · 1− · 1− ·f = · 1− · 1− · f
4 2 4 5 4 2 4 28
5 5
Solving the linear equation we get f 28 = 33 . And since every nice number p0 belongs
to only one cycle, they are represented by one and only one linear equation of this
p0
form and one can see when the coefficient of f 2K0 +1−p 0
is different in both LHS (for
which it is 1) and in RHS (for which it is a negative integral power of 2, basically 2M
where M ∈Z −
); and hence it must have a unique solution. And since we already know
p0
f 2K0 +1−p0 = 2Kp00+1 works, this must be its only value.
Hence the inductive step is proven.
Remark. Never thought a single FE will make mew hate FE forever lol.
10
Random Olympiad Problems updated 17 August 2023
Problem statement
Proof. Say we have for all f (x0 ) = 0 we have x0 < 0, then we have f (1) < 1 (since
P (1, −1)).
P (1, 1 − f (1)) → f (3 − f (1)) + f (1) = 0 and then by , we get f (1) = f (3 − f (1)) = 0,
J
a contradiction. □
Claim — f (0) = 0
√ √
Proof. Now using P ( a, −2 a) and
J
we get f (0) = 0. □
11
Random Olympiad Problems updated 17 August 2023
Problem statement
f f (n) (m) = mn
Claim — f is injective.
Proof. If f (a) = f (b) then P (m, a) and P (m, b) gives us our required. □
The last relation is since f is injective (and also we get f is bijective). And because of
the first claim we get f |f (n){f (n)−2}| (m) = m ( ).
J
See that gcd (|f (1){f (1) − 2}|, |f (2){f (2) − 2}|, |f (3){f (3) − 2}|, . . . ) | gcd [3(3 − 2), 4(4 − 2)] =
J
1 (the last relation is since f is bijective. And so by we get f must be the identity
function, but we can verify it is obviously not a solution.
Hence in conclusion we get that there are no functions which satisfy this equation.
12
Random Olympiad Problems updated 17 August 2023
Problem statement
Proof. From P (x, −2x), P (x, 0), P (0, x) and P (x, −x) we get
J
Proof. Applying in the original parent equation give us
=⇒ g(f (0)) − xg(−x) + (2x + y)g(y) = g(f (0)) − yg(−y) + (2y + x)g(x)
Then using the last relation (which by the way comes by switching x and y in the first
relation) and the result first claim; gives us
for all non-zero x, y, and so we get g(x) = mx + g(0) where m is a constant, for all x
(see that x = 0 satisfies the relation anyways). □
J
So substituting in the parent FE and using gives us (with a bit of computation) that
the only working pairs of functions (with verification) are
13
Random Olympiad Problems updated 17 August 2023
Problem Statement
Now; f (x + f (x)) = f (f (0)); then there must exist some d for which d + f (d) ̸= f (0). So
then by Ⓢ we get f (f (d + f (d))) = 0 =⇒ f (0) = 0.
P (x, 0 → xf (x) = −xf (f (x)) =⇒ f (x) = −f (f (x)) (no need to worry about x = 0
since f (0) = 0).
P (−f (x), x) → f (x) = −x (OR) f (x) = 0 (OR) f (−f (x)) = 0 for each x ∈ R. Now
f (−f (x)) = 0 =⇒ f (f (f (x))) = 0 (since f (x) = −f (f (x))). If f (x) ̸= 0 then;
f (f (x)) = 0 =⇒ f (x) = 0 (by ). So the options basically are f (x) = −x or 0 for each
J
x.
Claim — f (x) ≡ 0 ∀ x ∈ R
Proof. So assume there exists m, n ̸= 0 such that f (m) = 0 and f (n) = −n (obviously
n ̸= m).
Now P (n, m) → n2 = (n−m)f (−n). If f (−n) = 0 =⇒ n2 = 0 (contradiction) and iff (n) =
−n =⇒ 0 = −nm (contradiction again).
So either f (x) ≡ 0 or f (x) ≡ −x, but since f is not injective only the former must hold
(which works as well obviously). □
14
Random Olympiad Problems updated 17 August 2023
Problem statement
Let c > 0 be a given positive real and R>0 be the set of all positive reals. Find all
functions f : R>0 → R>0 such that
2a−f (a)
Proof. Assume for some a, we have 2a > f (a). Then substituting x = c in the
parent FE, we get 2cz = 0, a contradiction.
Hence we can define a function g : R>0 → R≥0 such that g(x) = f (x) − 2x. Hence we
can rewrite our original FE as
Hence see that we get g(y) ≤ g(x + 2y), g(cx + g(y) + x + 2y) ≤ g(x + 2y) for all x, y.
Now in the second inequality, we can apply the inequality on the LHS multiple times
unless we get g(something) ≤ g(x + 2y) where something > 2x + 4y (note that applying
the inequality on LHS again, increases the input by atleast x(c2 + c) and then see that
each time the new value of x always increases and hence it must reach our desired value
at some point). For example we get
g(x + 2y) ≥ g(cx + g(y) + x + 2y) ≥ g[c(cx + x + g(y)) + cx + x + g(y) + g(y) + 2y] ≥ . . .
Now applying the first inequality we get g(something) ≥ g(x + 2y) ⇐⇒ g(something) =
g(x + 2y) =⇒ g(cx + g(y) + x + 2y) = g(x + 2y) ⇐⇒ g(y) = 0 ⇐⇒ f (y) = 2y (which is
a solution obviously).
f (x) ≡ 2x ∀ x ∈ R>0
15
Random Olympiad Problems updated 17 August 2023
Problem statement
First see that by P (m(n + 1), mn) → f (m) | f (mn + m) − f (mn) and hence by in-
duction we get f (m) | f (mn) for all m, n ∈ Z. As a corollary we get f (n) | f (0) and
f (1) | f (n).
Claim — f is even.
Hence by P (m, −n) we get f (m + n) | f (m) − f (n) and denote this statement’s assertion
by Q(m, n).
Now if f (m) ≤ f (n), then by Q(m, n − m) we get f (n) | f (m) − f (n − m) but since our
assumption, we get f (m) = f (n − m). And then by P (n, n − m) we get f (m) | f (n). ■
16
Random Olympiad Problems updated 17 August 2023
Problem statement
for all x, y ∈ R.
P (x, f (0)) → f (0) · f (f (x)) = xf (0). If f (0) ̸= 0 then f (f (x)) = x but because of
J
we
get f (x) = x =⇒ f (0) = 0, contradiction. Hence f (0) = 0.
Now see that we have four equations and four variables (namely a, B, f (0), f (f (0))). So we
get f (f (−1)) = 0, f (− 12 ) = 0, f (0) = 12 , f (f (0)) = 1 and by P (x, 0) we get f (f (x)) = x+1.
So see that the original FE simplifies to f (xf (y) + y + 1) + y = f ((x + 2)f (y)).
P (−2, y) → f (−2f (y) + y + 1) = 12 − y ⇐⇒ −2f (y) + y + 32 = f ( 12 − y)
P (− 2f1(y) − 2, y) → f ( 12 − 2f (y) + y) = −y ⇐⇒ 1 − 2f (y) + y = f (−y) (Assume y ̸= − 21 ).
Now comparing the last two equations we got, we get that f (−y) + 12 = f ( 12 − y) ⇐⇒
f (y + 1) = f (y) + 1.
17
Random Olympiad Problems updated 17 August 2023
1
f (x) = x ∀ x ∈ R AND f (x) = x + ∀x∈R
2
Remark. This has to be the longest FE I have ever done (as of July 2023 atleast). This
took me over four hours to do! But the satisfaction dude......
18
Random Olympiad Problems updated 17 August 2023
Problem statement
Now from the last line we actually get f (2x) = (c + 1)x + c (where c = f (0)).
P (2x + 1, 2x) → c = ±1 (with a bit of computation ofcourse).
¶ Case A: If c = −1 Then see that f (2x) = −1 and f (2x+1) = a (for some constant a).
P (2x, 2x + 1) → f (2x − a) = −1, now if a is odd then f is identically −1 (obviously a
solution). And if a is even then P (2x + 1, 2x + 1) → a = −1 but a is even and hence this
is a contradiction.
Hence in conclusion we get that the only two functions which work is
19
Random Olympiad Problems updated 17 August 2023
Problem statement
for all a, b ∈ R.
Proof. Obviously both work. Hence assume there is some other function as well.
Call the non zero numbers which are fixed points having positive behavior and the latter
note that x and x2 have the same behavior).
J
negative behavior (by
Choose distinct c, d ̸= 0 such that c has positive behavior and d has negative behavior.
P (c, d) → f (c2 +cd−d2 ) = −cd+d2 +c2 ⇐⇒ −cd+d2 +c2 = c2 +cd−d2 or −c2 −cd+d2 ;
but in both cases we get a simple contradiction.
Hence in conclusion we get that the only two functions which work is
20
Random Olympiad Problems updated 17 August 2023
Problem statement
f (n) ≡ n ∀ n ∈ N
21
Random Olympiad Problems updated 17 August 2023
Problem statement
Find all functions f defined on all reals and taking real values such that
But then by P (0, x) we get f is constant and plugging it back to the original equa-
tion we get that the only working function is f (x) ≡ 0 ∀ x ∈ R .
22
Random Olympiad Problems updated 17 August 2023
Problem statement
Find all functions f : R → R such that for all x, y ∈ R, the following equality holds
If ⌊f (1)⌋ = 1 then by P (x, 1) → f (⌊x⌋) = f (x). Now choose 0 < a < 1 so P (x, a) →
f (⌊x⌋ a) = 0. Now see that x and a can be chosen appropriately such that ⌊x⌋ a can be
represented as any real number and hence f ≡ 0 but ⌊f (1)⌋ = 1 and so this is not a valid
solution in this case.
23
Random Olympiad Problems updated 17 August 2023
Problem statement
(f (x + y))2 = f (x2 ) + f (y 2 )
for all x, y ∈ Z.
where S is any subset of integers such that it is a super set of the set of all perfect squares.
24
Random Olympiad Problems updated 17 August 2023
Problem statement
Claim — There does not exist some b such that f (b) < 0.
Proof. Assume the contrary, then by P (b, y) and P (b, −y) gives us f (x) = 0 for all x < 0
and so this implies f ≡ 0 which is a contradiction.
So this means f (x) ≥ 0 for all x, this means the f (y 2 + f (x)) term is always 0 in the
parent FE and so we get f (y(f (x))) = 0 ⇐⇒ f (x) = 0 (which is obviously a solution
also).
Hence in conclusion we get that the only two functions which satisfy this FE are
25
Random Olympiad Problems updated 17 August 2023
Problem statement
Classify all functions f : N → Z such that for any positive integers a and b, the
following two properties holds
P (ab, a) → f (ba2 )+f (a2 b2 +a2 ) = f (ab)+f (a) ⇐⇒ f (ba2 ) = f (ba) → (1), f (a2 b2 +a2 ) =
f (a) → (2); which means f (a2 b2 + a2 ) = f (ab2 + a) = f (a) → (3) (also note that
f (2b) = f (b)).
Note that Y Y
f ( p i αi ) = f ( p i )
where (pi ) are pairwise distinct primes and αi ∈ N (by (1)). So basically we only need to
worry about the values of f on square-free numbers.
See that since f (a) ≥ f (1), then if f (a0 b0 ) = f (1) =⇒ f (a0 ) ≤ f (1) ⇐⇒ f (a0 ) = f (1).
From (3), we have f (b2 + 1) = f (1) =⇒ f (n) = f (1) for all n = qi where (qi ) are
Q
pairwise distinct primes which are congruent to 1 modulo 4. This is because all primes
1 modulo 4 divide some b0 2 + 1 and then by CRT, we can always find a b such that
qi | b2 + 1. P ( qi , rj ) → f ( qi · rj ) = f ( rj ), where (rj ) are pairwise distinct
Q Q Q Q Q Q
Now so basically we need to find the values of f on square-free numbers with all
prime factors being congruent to 3 modulo 4. Now coming back to the parent equation,
we get that now if we take any arbitary a, b to satisfy f (a) + f (b) = f (a2 + b2 ) + f (ab),
then let X be the set of all prime factors of a being congruent to 3 modulo 4, and let Y
be defined similarly for b then see that the parent equation is equivalent to satisfying
! ! !
Y Y Y Y
f x +f y = f z +f w → (4)
x∈A y∈B z∈A∪B w∈A∩B
Claim — f (p) can be anything if p ≡ 3 (mod 4) and these set of values uniquely
determines a function in terms of f (1) which satisfies the functional equation.
Proof. First note that we only need to show it satisfies equation (4).
Now one can see by simple induction that f ( ki=1 ri αi ) = ki=1 f (ri ) − (k − 1)f (1) (this
Q P
as well.
26
Random Olympiad Problems updated 17 August 2023
Remark. This was definitely one of the weirdest FE I have ever done (as of August 2023
atleast). I think the first time I did this, for some weird reason I got f is a constant function
but this was far from the truth. I think the motivation behind the solution of this problem
was actually trying to prove that the function is constant and for how many values n0 we
can find such that f (n0 ) = f (1). Some very basic facts of Number Theory was also required
in this problem.
27
Random Olympiad Problems updated 17 August 2023
§2 Combinatorics
§2.0.1 ELMO 2022/1
Problem statement
Let n > 1 be an integer. The numbers 1, . . . , n are written on a board. Aharshi and
Bryan take turns circling an uncircled number on the board with Aharshi going first.
When the product of the circled numbers becomes a multiple of n, the game ends
and the last player to have circled a number loses. For which values of n can Bryan
guarantee a victory?
We claim that Bryan is victorious if and only if n is odd and squarefree (at the same
time).
¶ Strategy for Bryan when n is an odd squarefree number This part is somewhat
confusing but trivial.
n
Now whatever Aharshi circles on his first move (say m), consider N = gcd(n,m) . See that
N= ̸ 1 since otherwise well Aharshi already lost (and Aharshi a.k.a me is not that dumb).
Now if N is a prime, then consider the list {N, 2N, . . . , n}, and see that none of the
numbers has been circled till now. So the only way the product of the circled numbers is
divisible by n is iff one of the numbers from the list is picked. Hence the number of ”safe”
n
numbers is n − N − 1 which is odd and since Bryan has the first move now, Aharshi will
run out of safe numbers first.
If N is composite, then let q be a prime such that q | N . Now Bryan circles Nq and
therefore by the same logic, there are n − nq − 2 safe numbers left with Aharshi going
first and see that the number of safe numbers left is even and hence Aharshi loses out on
safe numbers first.
¶ Strategy for Aharshi when n is not an odd squarefree number This part is a bit
tedious. Let n = kp where p is a prime.
First assume n is non-squarefree. Then let p be such that p | k. Then Aharshi will circle
k on his first move. Now the only way the product of the circled numbers is divisible
by n is iff one of the numbers which is divisible by p is picked. Now consider the list
{p, 2p, . . . , kp}, see that one of these numbers are already picked since p | k, and hence
that leaves us with kp − k ”safe” numbers with Bryan going first and see that kp − k is
always even and hence Bryan loses out on ”safe” numbers first.
Lastly assume n is even and squarefree. Then let p = 2. Then see that after Aharshi
circles k on his first move, then consider the list {2, 4, . . . , 2k} and see that hence there
is k − 1 safe numbers (since 2 ∤ k) and see that k − 1 is even and hence Bryan loses out
on safe numbers first again.
28
Random Olympiad Problems updated 17 August 2023
Problem statement
29
Random Olympiad Problems updated 17 August 2023
Problem statement
Aharshi has a n × n toroidal board; each square thus has four orthogonal neighbors;
call it its friends. Aharshi will paint every square one of the three colors: green, blue
or red. Then in each square we write a number as follows:
(i) If the square is green, write the number of of red friends plus twice the number
of blue friends.
(ii) If the square is red, write the number of of blue friends plus twice the number
of green friends.
(iii) If the square is blue, write the number of of green friends plus twice the number
of red friends.
Considering Aharshi can choose the coloring of the squares on the board, find the
maximum possible value she can obtain when she sums the numbers in all the
squares.
Claim — Each pair of neighboring distinct coloured squares adds three points to
the total sum, and zero points if they are same coloured.
Proof. The latter is trivial. For the former, see that one of the squares adds two points
to the total square and the other square adds one point to the total square, hence it adds
a total of three points in total.
Obviously the maximum occurs if and only if all the pair of neighboring squares have
distinct colors, which is always possible.
Since this is a toroidal board, obviously there is 2n2 pair of neighboring squares.
30
Random Olympiad Problems updated 17 August 2023
Problem statement
(i) Show that, whatever n and whatever the initial configuration, the numbers on
the board will eventually not change any more.
(ii) As a function of n, determine the minimum integer k such that, whatever the
initial configuration, after the k th list of numbers (inclusive), the configuration
will not change the numbers written on the board.
(ii) Let f (n) denote the minimum integer that satisfies our required criteria.
Let g(n) denote the minimum integer that will guarantee us that after those number
of moves, a list with last two integers as m, n (m ≤ n goes to a list with last two
integers n − 1, n. Assume g(1) = 0.
Now see that for all integers n ≥ 2, we have g(n) = 2.
Now looking back at the inductive process of part a, see that it takes us maximum
two moves to go from the initial list to a list with last two integers m, n with n ≤ n.
Hence see that f (n) = 1 + 2 + g(n) + g(n − 1) + · · · + g(1) ⇐⇒ f (n) = 2n + 1 .
(See that we added an extra one, since we are looking at the the k th sequence rather
than after k th move).
Now see that the maximum is always possible since we can work backwards from
the n − 1th case to the nth case. For example {1} ,→ {1, 2} ← {0, 2} ← {2, 2} ←
{1, 1} ← {3, 1}, and so see that in this case we again get f (2) = 5 as required.
31
Random Olympiad Problems updated 17 August 2023
§2.0.5 C-UnS-1
Problem statement
¶ First Way Take any two different binary strings, it will minimum add n+1 2 points
m m
and there are 2 such different binary strings. That gives us that X ≥ n+1
2 · 2 .
¶ Second Way Look at the ith position in each binary string. Say there are ki zeroes
and m − ki ones and so this position alone gives us exactly (m − k )k points. Hence
2 i i
X = ni=1 (m − ki ) · ki , and then by AM-GM we get: X ≤ n · m
P
2 .
32
Random Olympiad Problems updated 17 August 2023
Problem statement
The Bank of Oslo issues two types of coin: aluminum (denoted A) and bronze
(denoted B). Marianne has n aluminum coins and n bronze coins arranged in a row
in some arbitrary initial order. A chain is any subsequence of consecutive coins of
the same type. Given a fixed positive integer k ≤ 2n, Gilberty repeatedly performs
the following operation: he identifies the longest chain containing the k th coin from
the left and moves all coins in that chain to the left end of the row. For example,
if n = 4 and k = 4, the process starting from the ordering AABBBABA would be
AABBBABA → BBBAAABA → AAABBBBA → BBBBAAAA → · · · .
Find all pairs (n, k) with 1 ≤ k ≤ 2n such that for every initial ordering, at
some moment during the process, the leftmost n coins will all be of the same type.
Define a ”clump” as the a chain of only As or Bs. For example AABBBABA has 5
clumps. We begin with the following crucial claim.
Claim — After each move, the number of clumps can never increase. The number
of clumps will stay the same only if the k th coin and the nth coin or the k th coin
and the 1st coin are are in the same clump .
¶ Case A: k < n
One can actually see that none of the k will actually work since one can just take the
case where the first k coins are A, then the immediately next coin is B. See that, because
of it is trivial to see that the configuration will always stay the same.
¶ Case B: k ≥ n
Now in this case, see that the only way the number of clumps won’t reach 2 (basically
the left n most coins will be same) is if the number of clumps say constant after a while.
See that that if k ∈ n, 2n − n2 , then all k work. This is because, see that the
number of clumps will be constant after a point only if the k th and nth coins are always
in a clump after a point. Also see that the number of clumps can never be more than 3
because of our choice of k and hence one of the clumps will be consisting of n coins and
hence after a point, there will be left only two clumps.
This is because if 2 | n, then we can take the initial configuration as AA . . . ABB . . . BAA
. . . ABB . . . B, with each of the four clumps with n2 coins.
And if 2 ∤ n, then we can take our initial configuration as AA . . . ABB . . . BAA . . . ABB . . . B,
with one of the A-clumps being of size 2 and another one being ⌈ n2 ⌉ and similar for
n
the B clumps. See that the number of clumps will never decrease.
n
So in conclusion; we get (n, k) works if and only if k ∈ n, 2n − .
2
33
Random Olympiad Problems updated 17 August 2023
§3 Number Theory
§3.1 Constructions
§3.1.1 IMOSL 2007/N2
Problem statement
Let b, n > 1 be integers. Suppose that for each k > 1 there exists an integer ak such
that b − ak n is divisible by k. Prove that b = An for some integer A.
Proof. Let p be a prime such that p | b. Now if vp (b) ≥ cn + 1 for some non negative
integer c.
Then inserting k = p(c+1)n , we get
34
Random Olympiad Problems updated 17 August 2023
Problem statement
Kelvin the Frog and Alex the Kat are playing a game on an initially empty blackboard.
Kelvin begins by writing a digit. Then, the players alternate inserting a digit
anywhere into the number currently on the blackboard, including possibly a leading
zero (e.g. 12 can become 123, 142, 512, 012, etc.). Alex wins if the blackboard shows
a perfect square at any time, and Kelvin’s goal is prevent Alex from winning. Does
Alex have a winning strategy?
On the contrary actually Kelvin has a winning strategy . We will proceed by deriving a
contradiction.
Kelvin starts by picking 7 on his first move. See that no matter what Alex does
next, he can never make a perfect square. Now whatever Alex picks next, Kelvin chooses
to place either 2, 3, 7 or 8 in the last position (see that none of these as a last digit can
ever make a perfect square). Also, if Alex does not place a digit in the last spot then
again the number can never be a perfect square.
But if he does place a digit in the last position and it is a perfect square, then re-
member that Kelvin had a choice of 4 different digits he can place namely 2, 3, 7, 8 on his
last move, and for Alex to win this must mean that there is a positive integer x for which
100x + 20 + k1 , 100x + 30 + k2 , 100x + 70 + k3 , 100x + 80 + k4 are all perfect squares (for
some k1 , k2 , k3 , k4 ∈ {0, 1, 2, . . . , 9}). But see that since this is a three digit number at
minimum, the difference between two three digit perfect squares is atleast 21, we get
100x + 20 + k1 and 100x + 30 + k2 both cannot be perfect squares.
35
Random Olympiad Problems updated 17 August 2023
§3.2 Exponential NT
§3.2.1 USAJMO 2011/1
Problem statement
Find all positive integers n such that 2n + 12n + 2011n is a perfect square.
We can see if n = 1, the the value of the expression is 452 = 2025. Hence assume n > 1
thereafter.
If we apply modulo 3, then we get n is odd and applying modulo 4, gives us n is even.
Hence the only solution is n=1 .
36
Random Olympiad Problems updated 17 August 2023
Problem statement
Find all pairs of positive integers (x, p) with p being a prime such that xp−1 divides
(p − 1)x + 1.
See that if p = 2, then x = 1, 2 works; and also see that if x = 1, then all p suffices.
Hence assume there after p ≥ 3 and also x ≥ 2.
Let q be the smallest prime factor dividing x (obviously x is odd and hence so is q). See
that we get
Which means q | p2 − 2p. Then see by LTE we get vq (x) · (p − 1) ≤ vq ((p − 1)2x − 1) =
vq (p2 − 2p) + vq (x) =⇒ vq (p2 − 2p) ≥ vq (x) · (p − 2) ≥ p − 2 =⇒ p2 − 2p ≥ q p−2 ≥
3p−2 =⇒ p, q = 3 =⇒ x2 | 2x + 1.
Hence in conclusion we get the only solutions are (x, p) = (1, p0 ); (2, 2); (3, 3) where p0
is any prime number.
37
Random Olympiad Problems updated 17 August 2023
Problem statement
38
Random Olympiad Problems updated 17 August 2023
Problem statement
Assume n ≥ 11 and let p0 be the largest prime number not exceeding n. This must mean
that there exists two prime numbers less than n whose sum gives us p0 and obviously
this is only possible only if one of them is 2 and let the other one be p1 (also we get p1 is
the second largest prime number not exceeding n).
Again by the same process we get p1 must divide p2 + p3 for some distinct prime numbers
p2 > p3 . Obviously if both of them are less than p1 then p1 = p2 + p3 but this happens
only if p3 = 2 but this means p0 , p1 , p2 is an AP of common difference 2 and we know
this cannot happen since n ≥ 11. But if one of p2 , p3 is more than p1 we get
For the case when n ≤ 10, we can just case-bash and see that the only solution to
this problem is n = 7 .
39
Random Olympiad Problems updated 17 August 2023
Problem statement
(a + b)x = ay + by
¶ Case B: y ≥ 2 Let k = gcd(a, b) and say a = kc, b = kd (see that x < y).
Assume for now that max(a, b) ̸= 1 (hence x > 1).
Let p be any prime which divides cy + dy . Then we get
p | cy + dy ⇐⇒ p | (c + d)x ⇐⇒ p | c + d
And now applying Zsigmondy’s Theorem, we get this is a contradiction unless {c, d} =
{1, 2} and y = 3.
And so then we get 3x · k x = k 3 · 9 =⇒ x = 2, k = 1.
Obviously if a = b = 1 then x = 1 and any y suffices.
Hence in conclusion we get that the only positive integer quadruples which satisfy
this equation are (a, b, x, y) = (n, m, 1, 1); (1, 2, 2, 3); (2, 1, 2, 3); (1, 1, 1, l) (where n, m, l
are any positive integers).
Remark. Did not expect such a trivial problem by China (probably an objective problem
tbh).
40
Random Olympiad Problems updated 17 August 2023
Problem statement
¶ Case A: p, q ̸= 2, 5 and p ̸= q
Then see that by Fermat’s Little Theorem that 5p−1 ≡ −1 (mod q) and 5q−1 ≡ −1
(mod p). Hence ordp (5) | 2q − 2, p − 1, ordq (5) | 2p − 2, q − 1 but ordp (5) ∤ q − 1, ordq (5) ∤
p − 1.
Let v2 (ordp (5)) = a, v2 (ordq (5)) = b =⇒ v2 (q − 1) ≥ a, v2 (p − 1) ≥ b and also see that
v2 (q − 1) + 1 = b, v2 (p − 1) + 1 = a, which gives us a contradiction.
¶ Case B: p ̸= q
So we egt p2 | 2 · 5p ⇐⇒ p = 5.
¶ Case C: one of p, q = 2
Assume q = 2, and so we get 2p | 5p + 25 =⇒ p | 5p + 25 ⇐⇒ p | 30 ⇐⇒ p = 2, 3, 5 (But
see that p = q = 2 is not a solution).
¶ Case D: one of p, q = 5
Assume q = 5, and so we get 5p | 5p + 55 ⇐⇒ p | 5p + 55 ⇐⇒ p | 5 + 55 ⇐⇒ p = 2, 5, 313.
Hence in conclusion we get the only pairs which satisfy this equation are
(p, q) = (2, 3); (2, 5); (5, 5); (5, 313) and all permutations.
Remark. Wow, OK China really wanted all contestants to get 7 points in this problem.
41
Random Olympiad Problems updated 17 August 2023
Problem statement
x7 −1
Prove that there are no integer solutions to x−1 = y 5 − 1.
Proof. See that the equation can be re-written as Φ7 (x) = (y − 1)Φ5 (y).
Also recall this crucial lemma about cyclotomic polynomials
Lemma
A prime number q divides Φn (x) only if q | n or q ≡ 1 (mod n).
which means there is a prime factor of y − 1 which is not congruent to 1 modulo 7 and
so is for Φ7 (x), a contradiction. ■
42
Random Olympiad Problems updated 17 August 2023
Problem statement
√ √ √
So we get x3 = (y + −2)(y√ − −2) over √ Z[ −2]. √
Assume D is √ the gcd of y + −2 and y − −2 and hence D | 2 −2 So let D = a + bw
where w = −2 and we get (a + bw)(c + dw) = 2w ⇐⇒ ad + bc = 2, ac = 2bd.
If c = 0 then see that ad = 2, bd = 0 and so b = 0 and we get D = ±1, ±2. But if D = ±2,
then see that 4 | x3 and so x, y are even but modulo 4 gives us the contradiction. Hence
assume c ̸= 0.
With a bit of computation, we get b(2d2 + c2 ) = 2c. See that (c, d) = (0, 0) is a solution
and hence assume 2d2 + c2 ̸= 0 and so we get b = 2d22c+c2 =⇒ |2c| ≥ c2 ⇐⇒ |c| ≤ 2. By
case bashing we get (c, d) = (±1, 0); (±2, 0) and so we get b = ±1, ±2 and then we get
D = ±2w, ±w =⇒ 2 | x3 and so we get x, y is even and again modulo 4 gives us the
contradiction. √ √ √ √
And hence gcd(y + −2), (y − −2) = 1 and so we get each of (y + −2), (y − −2) is a
perfect cube itself. So we get y + w = a + bw3 and so we get by equating the coefficients
that a3 − 6ab = y, 3a2 b − 2 = 1 and by case bashing we get (a, b) = (±1, 1) =⇒ y = ±5
which gives us x = 3.
And so after too much computation we get the only integer solutions are (x, y) = (3, ±5) .
43
Random Olympiad Problems updated 17 August 2023
Problem statement
44
Random Olympiad Problems updated 17 August 2023
Problem statement
45
Random Olympiad Problems updated 17 August 2023
Problem statement
Find all positive integer pairs (a, n) such that n | (a + 1)n − an is an integer.
Obviously if n = 1 then all a suffices and hence assume there after that n ≥ 2.
n
Let p be the smallest prime factor of n. Then we get (a+1)n ≡ an (mod p) ⇐⇒ ( a+1a ) ≡
1 (mod p) ⇐⇒ ordp ( a+1 a+1
a ) | gcd(n, p−1) =⇒ ordp ( a ) = 1 (since p is the smallest prime
factor of n) ⇐⇒ a + 1 ≡ a (mod p), which is a contradiction.
Hence the only pairs which satisfy this relation are (a, n) = (k, 1) (where k is any
positive integer).
46