Although Euler was not the first to consider residue arithmetic he certainly
used it to the absolute maximum. We define the residue classes:

means

;

is called the residue of a modulo

.
The idea is this: for a given number

we can subdivide all numbers into

categories according as their remainders upon division by

There is an entire mathematical subject of the arithemetic of residues, and in
this short journey into modular arithmetic, we will consider the
ancient process of "casting out nines." But first things first. Let step
back and look at just plain old divibility.
A positive or negative integer

is said to be divisible by an integer

if there is an integer

such that

If
this is the case we save

divides

and we write

If this is not the case we write


Alternatively, if

divides

we also say that

is a multiple of

There are many useful facts about divisibility.

and

Also

if and only if

If

and

then

If

and

then

.
If

and

then

If

then

If

and


then

for all integers

and

You can test you skills by proving these facts.
Given any two non negative integers

and

,
we know that we can
write
where

and

are non negative integers. (This is called the division
algorithm.) Written otherwise we
have
Thus
we call

the quotient of

divided by

and

the remainder. However, the term for remainder we use
here is residue. It is this quantity that we are most
interested in. Indeed, we write

We
read this relation as:

Using residues we may safely re-classify even and odd numbers thusly: Even
numbers equal zero modulo two and odd numbers equal one modulo two. That is,

It
is best to become accustom to this notation. It is convenience and precise.
We can speak of the residue class of a number

to be all those numbers having the same residue modulo

Many, many interesting results in mathematics and its application are concerned with the determination of which numbers are residues of other numbers.
For example, much of both ancient and modern encryption theory is based on the theory of residues.
The residues of the number three are

and

That is to say that any number

can be written
as
Let's tabulate all the integers up to 44 according to its residue class modulo 3.

A brief examination of the residue class of zero mod 3 reveals that each of these numbers has digits with sum also a multiple of three. Indeed we have,
A number is divisible by three if and only if the sum of its digits 0 is divisible by three.
The proof of this result will have to wait until we've proved some interesting results about residues.
(First law of residues) Given an integer

the residue
(
)
of the sum of any two numbers is equal to the sum of the residues of the
individual numbers, with the proviso that if the sum of the individual
residues sum to

or more, we take the residue of this value. That is, for the given integers

and

,
Proof. We have

where

and

where

.
Thus


We
have that


If

we have

Thus

Otherwise,


(Second law of residues)
Given an integer

the residue
(
)
of the product of any two numbers is equal to the product of the residues of
the individual numbers, with the proviso that if the product of the individual
residues product to

or more, we take the residue of this value. That is, or the given integers

and

,
Proof. (See problems.)
Let us consider the residue classes for the value

Our
next law of residues applies particularly to this
number
First examine the chart of the residue classes for division by 9. As is
obvious there are nine columns, one for each possible residue.

(Third law of residues) The residue of any number modulo 9 is equal to the residue of the sum of its digits (modulo 9).
Proof. (See problems.)
With respect to the residue 0, this theorem is sometimes called casting out nines. It gives a particularly simple and quick way to determine if a number is divisible by nine: A number is divisible by nine if the sum of its digits is also divisible by nine.
Some of you have a little difficulty with this problem. While the discussion below is not the full solution, the hint should get you going.
7. Let

be the sum of the reciprocals of all numbers with primes factors 2, 3, and 5.
Prove Euler's formula in the special case, that

HINT.
Usually when having a difficult time solving a problem because I don't
understand where to begin. I make the problem simpler. Let's skip the
multiples of

and

and suppose we have only multiples of

Then

and
the product reduces to

,
which you can easily expand as a geometric series

This
you will note is exactly

So, what we've done here is show Euler's formula reduces to a very simple case
when there is just one prime number. You could also verify the formula in the
case of any single prime

by the same argument.
This is the hint. Expand each of the terms

for

as a geometric series and then multiply them all together. Don't actually do
the multiplication! Rather you should argue that the product of the three
infinite series contains all unital fractions with denominators having only
factors 2, 3, and 5.
We also fixed up a little typo.
This document created by Scientific WorkPlace 4.1.