Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Canada Winter Camp 2023

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic

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,

ab−1 + cd−1 ≡ (ad + bc) · (bd)−1 (mod n)

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

ϕ(n) = (p1 − 1)(p2 − 1) . . . (pn − 1) · pe11 −1 · pe22 −1 · · · · · penn −1

.‘

Theorem 4 (Euler’s Totient theorem). If gcd(a, n) = 1, then aφ(n) ≡ 1 (mod n). An


immediate corollary is Fermat’s Little Theorem, which states that for any prime p and
integer a, if p ∤ a then ap−1 ≡ 1 (mod p).

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,

x2 ≡ 0, 1 (mod 3), x2 ≡ 0, 1, 4 (mod 5), x2 ≡ 0, 1, 4 (mod 8)

x3 ≡ 0, 1, 6 (mod 7), x3 ≡ 0, 1, 8 (mod 9)


Notice that many of these are the form xk (mod n) for 2k = φ(n); why?
Problem 1 (Wilson’s Theorem). Given a positive integer p > 1, (p − 1)! ≡ −1
(mod p) if and only if p is prime.
Problem 2 (1979 USAMO). Find all non-negative integer solutions to n41 + n42 + · · · +
n414 = 1599.

1
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic

2 Chinese Remainder Theorem


Theorem 5 (Chinese Remainder Theorem). Given any relatively prime n1 , n2 , . . . , nk
and any integers m1 , . . . , mk , there is an integer x such that x ≡Q
mi (mod ni ) for all i
(in fact, there is a unique integer of this form, such that 0 ≤ x < ni .
Note that CRT can be used to ”build” together a bunch of modular equivalences, but
it can also be used to break them apart. Strong intuition of this fact will allow you
to quickly deduce if CRT can be used, and is also very useful at the Olympiad level.
Additionally, note that at the Olympiad level CRT is more of an existence proof - if
you wish to prove there exists some number satisfying a property mod a bunch of prime
powers, you can use CRT to deal with each of the prime powers individually without
ever finding the number explicitly. There are methods to calculate the number explicitly,
and it’s basically just following the proof of CRT.

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?

Theorem 7. If am ≡ 1 (mod n) then ordn (a) | m. This is particularly useful in


conjunction with Euler’s.
n
Problem 7 (Classic). Prove any factor of 22 + 1 is 1 (mod 2n+1 ).
Problem 8 (Classic). Find all n such that n | 2n − 1.

2
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic

5 Modular Arithmetic and Order Problems


1
Problem 9 (Classic, useful lemma). For any integer 1 ≤ k < p we have k ≡
(−1)k−1 · p1 kp (mod p).
k k k
Problem 10 (Classic). Show (a + b)p ≡ ap + bp (mod p) for primes p and integers
a, b, k with k > 0.
Problem 11 (IMO). Determine all positive integers relative to all terms in the sequence
an = 2n + 3n + 6n − 1.
Problem 12 (Romania TST (?)). Let n > 2 be an integer. Let S be the set of
integers 0 < m < n such that gcd(m(m + 1), n) = 1. Let x be the product of the elements
of S. Find x (mod n) in terms of n.
Problem 13 (Classic). Let p be an odd prime. Prove

1p−1 + 2p−1 + · · · + (p − 1)p−1 ≡ p + (p − 1)! (mod p2 )

.
Problem 14 (China TST). Find all positive integers a, n such that n divides (a+1)n −an .

6 Euclidean Algorithm Problems


Problem 15 (Classic; useful lemma, you should solve if you haven’t seen before).
Prove for any positive integers a, m, n, we have gcd(am − 1, an − 1) = agcd(m,n) − 1.
Problem 16 (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 17 (APMO). Are there distinct prime numbers a, b, c such that a | bc+b+c, b |
ca + c + a, c | ab + a + b?.
Problem 18 (IMO). Given any set A = {a1 , a2 , a3 , a4 } of four distinct positive integers,
we denote the sum a1 + a2 + a3 + a4 by sA . Let nA denote the number of pairs (i, j)
with 1 ≤ i < j ≤ 4 for which ai + aj divides sA . Find all sets A of four distinct positive
integers which achieve the largest possible value of nA .

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

a11 + 11b11 + 111c11 = 0

.
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

are congruent modulo 2n to 1, 3, 5, . . ., 2n − 1 in some order.


Problem 28 (ELMO). Let a1 , a2 , . . . , an be positive integers with product P, where n
is an odd positive integer. Prove that

gcd(an1 + P, an2 + P, . . . , ann + P ) ≤ 2 gcd(a1 , . . . , an )n .

Problem 29 (Romania TST). Let k be a nonzero natural number and m an odd


natural number . Prove that there exist a natural number n such that the number
mn + nm has at least k distinct prime factors.
Problem 30 (TSTST). Find all nonnegative integer solutions to 2a + 3b + 5c = n!.
Problem 31 (ISL). Find all pairs (p, q) of prime numbers which p > q and

(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 .

9 Problems I didn’t do but seem cool


Problem 34 (ELMO). Let S be a nonempty set of positive integers such that, for any
(not necessarily distinct) integers a and b in S, the number ab + 1 is also in S. Show that
the set of primes that do not divide any element of S is finite.

4
Kevin Min (January 5, 2023) Divisibility and Modular Arithmetic

Problem 35 (Romania TST). Let a1 , . . . , an be positive integers and a a positive


integer that is greater than 1 and is divisible by the product a1 a2 . . . an . Prove that
an+1 + a − 1 is not divisible by the product (a + a1 − 1)(a + a2 − 1) . . . (a + an − 1).
Problem 36 (China TST). Let p be a prime number and a, k be positive integers such
that pa < k < 2pa . Prove that there exists a positive integer n such that
 
2a n
n<p , ≡ n ≡ k (mod pa ).
k

You might also like