Maths WorkshopMaths problems with full solutions
Exercise 331Combinatorics › Pigeonhole principleL1Added 31 Oct 2026

Pigeonhole modulo 4

#pigeonhole#congruences

Statement

Show that among any five integers, there are two whose difference is divisible by 44.

Hint

Sort the integers by their remainder when divided by 44.

Show solutionHide solution

Solution

Every integer has a remainder in {0,1,2,3}\{0,1,2,3\} when divided by 44. These are 44 possible remainders ("boxes") for 55 integers.

By the pigeonhole principle, two of the integers have the same remainder. If a=4q+ra=4q+r and b=4q′+rb=4q'+r, then a−b=4(q−q′)a-b=4(q-q') is divisible by 44.