Modular Arithmetic

From UBC Wiki

Modular arithmetic is a system of arithmetic that concerns remainders. Instead of mainstream notation, I have introduced a new notation. I will provide examples to clarify. For the duration of this text, variables are denoted by italicized lowercase letters, and can represent any integer, unless restrictions are specified. n, however, is always positive.

Axioms

Remainders

Define

to be the remainder when a is divided by n.

Example:

Define the axiom

for some k.

Example:

Congruence

Define the relation

Example:

Define the axioms

Define the axioms

Define the axiom

where i is any positive integer.

Theorems

Additive Property

Define the relationship

Proof:

Let

Then

Corollary:

Multiplicative Property

Define the relationship

Proof:

Let

Then

Corollary:

Exponential Property

Define the relationship

where b is positive.

Proof:

Assume this relation holds for some b. Then

Therefore, it follows that if this relation holds for b, it also holds for b + 1. Let b = 1. Then

This holds true. Therefore, this relation holds true for any positive b.

Corollary:

where c is positive.

Divisor Rule

Define the relationship

where x and y are positive.

Proof:

for some r. Let

Then, it follows that

And

Therefore

Similarly for y.

Product Rule

Define the relationship

where x and y are positive, and gcd is the greatest common divisor function.

Proof:

Let

Then, by gcd(x, y) = 1,

Therefore

Exponential Identity

Define the relationship

where

Proof:

This directly follows from the binomial theorem.

Exponential Congruence Theorem

If gcd(n, a) = 1, then there exists p such that

Proof:

Assume there does not exist such p. By the Pigeonhole Principle, there exist p1 and p2 such that

Then, it must be the case that either

or

But since p1 - p2 > 0, this case contradicts the assumption. Then, the second case must be true.

But

which is not satisfied since gcd(n, a) = 1. Therefore, the assumption is false, and the theorem is proven.

Examples

Problem 1

Does there exist a number that is a perfect square, a multiple of 2 but not a multiple of 4?

Solution:

This is equivalent to finding n such that

Then, if such n exists,

Clearly, y = 2k. But

which is impossible. Therefore, n does not exist.

Problem 2

Given the function

find

Note: this is equivalent to the last 2 base 10 digits of

Solution:

To simplify this, we look for simpler congruences. By the exponential identity, we get

if p = 5k. Therefore

To proceed, we use the product rule to split up 10 into 2 and 5, getting

for some k. To proceed, we evaluate

for some k. Then

Putting the product back together, we get

Therefore, our desired result is