Canada Winter Camp 2023
Canada Winter Camp 2023
Canada Winter Camp 2023
1 Modular arithmetic
Theorem 1 (Basic arithmetic). If a ≡ b (mod m), then ac ≡ bc, a ± c ≡ b ± c (mod m)
and ac ≡ bc .
Theorem 2 (Modular Inverses). For any integers a, n with gcd(a, n) = 1, there exists a
unique integer x (mod n) such that ax ≡ 1 (mod n), denoted a−1 .
True ”division” in modular arithmetic is the same as multiplying by the inverse, as
long as both operations are legal - in particular, you can ”add” and multiply inverses
like you would with fractions. More formally,
and
a−1 · b−1 ≡ (ab)−1 (mod n)
provided all relevant inverses are defined.
Theorem 3 (Modular Division (kind of)). If ac ≡ bc (mod n), then a ≡ b (mod n/ gcd(c, n))
for any integers a, b, c, and n.
Definition (Euler’s Totient function). Euler’s Totient function counts the number of
positive integers less than or equal to n that are relatively prime to n for some integer n.
It is denoted φ(n).
If the prime factorization of n is pe11 · pe22 · · · · · penn , then
.‘
One final useful fact about modular arithmetic is that often times when working with
squares/cubes/powers (often to solve diophantines), it can be useful to take modular
certain numbers, because these powers oftentimes only take on certain values mod n.
Notably,
1
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic
Problem 3 (USAMO). Show that, for any fixed integer n ≥ 1, the sequence
2 22
2, 22 , 22 , 22 , . . . (mod n)
is eventually constant.
Problem 4 (Classic). Let O be the origin of the coordinate plane. Call a lattice point
P visible if segment OP has no other lattice points on the interior of it. Prove there
exists an n × n grid of lattice points, none of which are visible, for any n > 0
3 Euclidean Algorithm
Theorem 6 (Euclidean Algorithm). gcd(a, b) = gcd(a − b, b). This can easily be
generalized to show gcd(a, b) = gcd(a − nb, b); in Olympiad number theory this is often
used in the context of a | b =⇒ a | b − na.
Problem 5 (Polish MO). Find all integer polynomials such that f (n) | 2n − 1 for all
integers n > 0.
Problem 6 (HMMT). Find all positive integers n such that the following holds: if
d > 0 divides n, then d2 + d + 1 | n2 + n + 1.
4 Orders
Definition (Order). Given two relatively prime numbers a, n, the order of a with respect
to n (denoted ordn (a) is the smallest positive integer k such that ak ≡ 1 (mod n). Why
does such an order always exist?
2
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic
.
Problem 14 (China TST). Find all positive integers a, n such that n divides (a+1)n −an .
7 CRT Problems
Problem 19 (Classic). Show for each prime p, there exists n with 2n ≡ n (mod p).
Problem 20 (Classic). Find the number of solutions to x2 ≡ x (mod n), for 0 ≤ x < n.
Problem 21 (Unknown). Let a, b satisfy gcd(a, b) = 1. Prove for any n, one can find
n terms from the sequence a, a + b, a + 2b, . . . that are pairwise relatively prime.
Problem 22 (Baltic 2006). Does there exist a sequence a1 , a2 , a3 , . . . of positive
integers such that the sum of every n consecutive elements is divisible by n2 for every
positive integer n?
3
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic
8 Assorted Problems
Problem 23 (IMO). Let d be any positive integer not equal to 2, 5 or 13. Show that
one can find distinct a, b in the set {2, 5, 13, d} such that ab − 1 is not a perfect square.
Problem 24 (Unknown). Find all integer solutions of
.
Problem 25 (AIME). Find the number of ordered pairs (m, n) such that m and n are
positive integers in the set {1, 2, ..., 30} and the greatest common divisor of 2m + 1 and
2n − 1 is not 1.
Problem 26 (AIME). For any positive integer a, σ(a) denotes the sum of the positive
integer divisors of a. Let n be the least positive integer such that σ(an ) − 1 is divisible
by 2021 for all positive integers a. Find the sum of the prime factors in the prime
factorization of n.
Problem 27 (ISL). Let n be a positive integer. Show that the numbers
n n n n
2 −1 2 −1 2 −1 2 −1
, , , ...,
0 1 2 2n−1 − 1
(p + q)p+q (p − q)p−q − 1
(p + q)p−q (p − q)p+q − 1
is an integer.
Problem 32 (USA TSTST). For which positive integers b > 2 do there exist infinitely
many positive integers n such that n2 divides bn + 1?
n
Problem 33 (China TST). Show for any n ≥ 3, 22 + 1 has a prime factor larger than
(n + 1)2n+2 .
4
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic