Chinese remainder theorem
MOPSS
6 May 2025
Mathematics Olympiad
Problem Solving Sessions
MOPSS
Department of Mathematics
IISER Bhopal
https://jpsaha.github.io/MOTP/MOPSS/
Suggested readings
• Evan Chen’s advice On reading solutions, available at https://blog.
evanchen.cc/2017/03/06/on-reading-solutions/.
• Evan Chen’s Advice for writing proofs/Remarks on English, available at
https://web.evanchen.cc/handouts/english/english.pdf.
• Notes on proofs by Evan Chen from OTIS Excerpts [Che25, Chapter 1].
• Tips for writing up solutions by Edward Barbeau, available at https:
//www.math.utoronto.ca/barbeau/writingup.pdf.
• Evan Chen discusses why math olympiads are a valuable experience for
high schoolers in the post on Lessons from math olympiads, available at
https://blog.evanchen.cc/2018/01/05/lessons-from-math-olympiads/.
List of problems and examples
1.1 Example (Canada CMO 1991 P1) . . . . . . . . . . . . . . . 2
1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Example (India RMO 2015a P3, Canada CMO 1991 P1 Ex-
ample 1.1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Example (India RMO 2018b P3) . . . . . . . . . . . . . . . . 5
§1 Chinese remainder theorem
Example 1.1 (Canada CMO 1991 P1). Show that the equation x2 + y 5 = z 3
has infinitely many solutions in integers x, y, z for which xyz ̸= 0.
Walkthrough — Note that
210 + 210 = 211
holds. But this does not seem to be of any help! What about 220 + 220 ? Also
note that if (x, y, z) is a solution, then another solution can be obtained by
multiplying x2 + y 5 = z 3 by k30 , namely, (k15 x, k6 y, k10 z) is also a solution.
Solution 1. Note that
(k 15 210 )2 + (k 6 24 )5 = k 30 221 = (k 10 27 )3
holds for any positive integer k. ■
Example 1.2. Show that there are infinitely many triples (x, y, z) of positive
integers such that x2 + y = z 7 .
Walkthrough — Does 26 + 26 = 27 help?
Solution 2. Note that 26 + 26 = 27 holds. It shows that (23 k 7 , 26 k 14 , 2k 2 ) is
a solution to the given equation. This proves the result. ■
Here is another solution to the above problem.
Solution 3. Note that if x, y, z are positive integers satisfying y = 2x + 1 and
x2 + y = z 7 , then (x + 1)2 = y 7 holds, which shows that
x = a7 − 1, z = a2
for some positive integer a. Observe that for any integer a ≥ 2, the triple
(a7 − 1, 2(a7 − 1) + 1, a2 ) of positive integers satisfy the given equation. Thus
the result follows. ■
2
1 Chinese remainder theorem Typos may be reported to [email protected].
Example 1.3. There are infinitely many triples (x, y, z) of positive integers
such that x2 + y 3 = z 7 .
Walkthrough — Note that 26 + 26 = 27
(23 )2 + (22 )3 = 27
holds. This shows that (23 k3·7 , 22 k2·7 , 2k2·3 ) is a solution to the above equation
for any positive integer k.
Here is another argument from [Beu12].
Solution 4. Take three positive integers a, b, c satisfying a + b = c. Multiplying
it by a21 b14 c6 , we obtain
(a11 b7 c3 )2 + (a7 b5 c2 )3 = (a3 b2 c)7 .
■
Remark. The following is a result due to Poonen–Schaefer–Stoll [PSS07],
determining the primitive solutions to x2 + y 3 = z 7 , that is, the triples of
integers having prime factor in common and satisfying this equation. Its proof
uses techniques from Arithmetic Geometry, and lies beyond the scope of this
modest notes, for obvious reasons! The only purpose of stating the following
result is to indicate that finding all solutions of prescribed nature to some
equation (say, the primitive solutions to the above equation) often turns out to
be a problem of considerable interest, and may require modern techniques to
solve them.
Theorem 1 (Poonen, Schaefer, Stoll)
The primitive solutions to x2 + y 3 = z 7 are the 16 tuples
(±1, −1, 0), (±1, 0, 1), ±(0, 1, 1), (±3, −2, 1), (±71, −17, 2),
(±2213459, 1414, 65), (±15312283, 9262, 113), (±21063928, −76271, 17).
Example 1.4 (India RMO 2015a P3, Canada CMO 1991 P1 Example 1.1).
Show that there are infinitely many triples (x, y, z) of integers, such that
x3 + y 4 = z 31 .
Walkthrough —
(a) Note that
212k + 212k = 212k+1
holds.
(b) It suffices to find an positive integer k such that 12k + 1 = 31ℓ holds
Some style files, prepared by Evan Chen, have been adapted here. 3
6 May 2025 https://jpsaha.github.io/MOTP/
for some positive integer ℓ. This shows that any such integer ℓ satisfies
ℓ ≡ 1 mod 3, and ℓ ≡ −1 mod 4, which implies that ℓ ≡ 7 mod 12.
Moreover, if ℓ is congruent to 7 modulo 12, then
31ℓ − 1 ≡ 31 ∗ 7 − 1 mod 12 ≡ 72 − 1 mod 12 ≡ 0 mod 12
holds, or equivalently, there exists an integer kℓ such that
12kℓ + 1 = 31ℓ
holds.
(c) Note that
(24kℓ , 23kℓ , 2ℓ )
satisfies the given equation, for any positive integer ℓ ≡ 7 mod 12.
Remark. Alternatively, one may argue as follows, motivated by the solution of
Example 1.3.
Solution 5. Let a, b, c be integers such that a + b = c. Multiplying by ap bq cr ,
we get
ap+1 bq cr + ap bq+1 cr = ap bq cr+1 .
Note that ap+1 bq cr , ap bq+1 cr , ap bq cr+1 are a 3rd, 4th, and a 31st power respec-
tively if 3 divides p + 1, q, r, 4 divides p, q + 1, r, 31 divides p, q, r + 1, which
holds if there are positive integers P, Q, R such that
p = 4 · 31 · P, q = 3 · 31 · Q, r = 3 · 4 · R
holds, and 3 divides 4 · 31 · P + 1, 4 divides 3 · 31 · Q + 1, 31 divides 3 · 4 · R + 1.
Since the integers 3, 4, 31 are pairwise coprime, it follows that each of them is
coprime to the product of the remaining two integers, and hence, by the division
algorithm, there are positive integers P, Q, R such that 3 divides 4 · 31 · P + 1,
4 divides 3 · 31 · Q + 1, 31 divides 3 · 4 · R + 1, or equivalently,
P ≡ 2 mod 3, Q ≡ 3 mod 4, R ≡ 18 mod 31
holds. In the above, the last congruence is obtained using (3 · 4) · (6 · 3) ≡
−1 mod 31, which follows from 3 · 4 · 6 ≡ 10 mod 31 and 10 · 3 ≡ −1 mod 31.
This shows that for any positive integers P, Q, R satisfying the above con-
gruence conditions (for instance, P = 2, Q = 3, R = 18), and for any positive
integers a, b, c satisfying a + b = c, the triple
1 1 1
((ap+1 bq cr ) 3 , (ap bq+1 cr ) 4 , (ap bq cr+1 ) 31 )
satisfies the given equation, where p = 124P, q = 93Q, r = 12R. Hence the
given equation has infinitely many solution in integers. ■
4 The content posted here and at this blog by Evan Chen are quite useful.
References Typos may be reported to [email protected].
Example 1.5 (India RMO 2018b P3). Show that there are infinitely many
tuples (a, b, c, d) of natural numbers such that a3 + b4 + c5 = d7 .
Remark. All of the above examples (which excludes Theorem 1!) admit
solutions using the Chinese remainder theorem.
References
[Beu12] Frits Beukers. “The generalized Fermat equation”. In: Explicit
methods in number theory. Vol. 36. Panor. Synthèses. Soc. Math.
France, Paris, 2012, pp. 119–149 (cited p. 3)
[Che25] Evan Chen. The OTIS Excerpts. Available at https : / / web .
evanchen.cc/excerpts.html. 2025, pp. vi+289 (cited p. 1)
[PSS07] Bjorn Poonen, Edward F. Schaefer, and Michael Stoll.
Twists of X(7) and primitive solutions to x2 +y 3 = z 7 . In: Duke Math.
J., 137:1 (2007), pp. 103–158. issn: 0012-7094. doi: 10.1215/S0012-
7094- 07- 13714- 1. url: http://dx.doi.org/10.1215/S0012-
7094-07-13714-1 (cited p. 3)
Some style files, prepared by Evan Chen, have been adapted here. 5