Pascal's Triangle and Its Relatives

Background

Modular Arithmetic

Even and odd can be described by what happens when a number is divided by 2:
    odd numbers have remainder 1
    even numbers have remainder 0
Numbers having the same remainders when divided by 2 are called congruent mod 2.
Every even number is congruent to 0 mod 2; every odd number to 1 mod 2.
Dividing by 3 can give 0, 1, or 2 as a remainder.
In general, dividing by n can give 0, 1, 2, ..., n-1 as a remainder.
Numbers sharing the same remainder when divided by n belong to the same congruence class (mod n).
For example, the congruence class of 1 (mod 4) is {1, 5, 9, 13, 17, 21, 25, 29, 33, 37, ...}. This set is denoted [1]4.
We will need this fact about congruence class arithmetic:
[a]n + [b]n = [a+b]n

Return to Background.