Number theory is the study of whole numbers. If you want to understand prime numbers, divisibility, or modular arithmetic, you are already looking at the core of number theory.
A prime number is an integer greater than with exactly two positive divisors: and itself. Divisibility asks whether one integer goes into another with no remainder. Modular arithmetic tracks remainders, which is why people often call it clock arithmetic.
What Number Theory Covers
These three ideas fit together:
- Primes are the basic building blocks of positive integers.
- Divisibility tells you when one integer fits exactly into another.
- Modular arithmetic rewrites divisibility questions as remainder questions.
For example, saying " is divisible by " is the same as saying
So a divisibility question can often be rewritten as a remainder question.
Prime Numbers: The Building Blocks
Prime numbers begin
The number is the only even prime. Every other even number is divisible by , so it cannot be prime.
If a positive integer greater than is not prime, it is called composite. For example, is composite because
Primes matter because every integer greater than can be written as a product of primes, up to the order of the factors. That is the idea behind prime factorization.
Divisibility: When One Number Fits Exactly
If and are integers with , then " divides " means there is an integer such that
This is written as
For instance, because . But because dividing by leaves a remainder.
Divisibility is the language behind factors, multiples, greatest common divisors, and least common multiples. It also explains familiar tests:
- A number is divisible by if its last digit is even.
- A number is divisible by if its last digit is or .
- A number is divisible by if the sum of its digits is divisible by .
That last rule is not a trick. It comes from modular arithmetic.
Modular Arithmetic: Working With Remainders
When two integers leave the same remainder when divided by , they are called congruent modulo . We write
This means divides .
For example,
because and both leave remainder when divided by , and also because divides .
This is useful because you can replace a number with a simpler congruent number. On a -hour clock, adding hours has the same effect as adding hours because
Worked Example: Why Is Divisible by ?
Take the number .
First, write it in place-value form:
Now work modulo . Since
it follows that
So
Because , the number is divisible by .
This explains the digit-sum rule: in base , each power of is congruent to modulo , so the whole number has the same remainder as the sum of its digits.
And once you divide,
so is composite, not prime.
Common Mistakes In Number Theory
Treating As Prime
is not prime. A prime must have exactly two positive divisors, and has only one.
Forgetting The Condition In Divisibility
The statement only makes sense with . Division by zero is not allowed.
Mixing Up Equality And Congruence
does not mean . It means they differ by a multiple of .
Overusing Divisibility Rules
Some tests are quick because base- arithmetic makes them work nicely. That does not mean every divisor has a simple digit rule.
Where Number Theory Shows Up
At school level, number theory appears in factorization, remainder problems, divisibility proofs, and clock-style questions. It also shows up when you reduce fractions, look for common factors, or solve problems with repeating cycles.
At a deeper level, primes and modular arithmetic are also central in cryptography and computer science. You do not need that background to use the ideas, but it helps explain why number theory keeps reappearing in applied settings.
Try Your Own Version
Try the same reasoning with . First use its digit sum to test divisibility by , then factor it enough to decide whether it is prime or composite.
If you want to check your method, solve a similar divisibility or remainder problem in a math solver and compare the modular arithmetic steps with your own.
Need help with a problem?
Upload your question and get a verified, step-by-step solution in seconds.
Open GPAI Solver →