The concept of numerical congruence was formulated by Gauss. If two numbers have the same remainder when divided by a given number m (called the modulus), then they are said to be congruent modulo m. We say "a is congruent to b (modulo m)". Another way of defining the concept is to say that two numbers are congruent modulo m if m divides the difference of the two numbers. We usually assume that the modulus is greater than zero. For example, 18 and 25 both leave a remainder of 4 when divided by 7 and are therefore congruent modulo 7.
Here is a sample of recreational applications of congruences: