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 11 with exactly two positive divisors: 11 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 "aa is divisible by nn" is the same as saying

a0(modn)a \equiv 0 \pmod n

So a divisibility question can often be rewritten as a remainder question.

Prime Numbers: The Building Blocks

Prime numbers begin

2,3,5,7,11,13,2, 3, 5, 7, 11, 13, \dots

The number 22 is the only even prime. Every other even number is divisible by 22, so it cannot be prime.

If a positive integer greater than 11 is not prime, it is called composite. For example, 2121 is composite because

21=3721 = 3 \cdot 7

Primes matter because every integer greater than 11 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 aa and bb are integers with b0b \ne 0, then "bb divides aa" means there is an integer kk such that

a=bka = bk

This is written as

bab \mid a

For instance, 4204 \mid 20 because 20=4520 = 4 \cdot 5. But 4224 \nmid 22 because dividing 2222 by 44 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 22 if its last digit is even.
  • A number is divisible by 55 if its last digit is 00 or 55.
  • A number is divisible by 33 if the sum of its digits is divisible by 33.

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 nn, they are called congruent modulo nn. We write

ab(modn)a \equiv b \pmod n

This means nn divides aba-b.

For example,

175(mod12)17 \equiv 5 \pmod{12}

because 1717 and 55 both leave remainder 55 when divided by 1212, and also because 1212 divides 175=1217 - 5 = 12.

This is useful because you can replace a number with a simpler congruent number. On a 1212-hour clock, adding 1515 hours has the same effect as adding 33 hours because

153(mod12)15 \equiv 3 \pmod{12}

Worked Example: Why Is 231231 Divisible by 33?

Take the number 231231.

First, write it in place-value form:

231=2100+310+1231 = 2 \cdot 100 + 3 \cdot 10 + 1

Now work modulo 33. Since

101(mod3)10 \equiv 1 \pmod 3

it follows that

100=102121(mod3)100 = 10^2 \equiv 1^2 \equiv 1 \pmod 3

So

23121+31+12+3+1=60(mod3)231 \equiv 2 \cdot 1 + 3 \cdot 1 + 1 \equiv 2 + 3 + 1 = 6 \equiv 0 \pmod 3

Because 2310(mod3)231 \equiv 0 \pmod 3, the number is divisible by 33.

This explains the digit-sum rule: in base 1010, each power of 1010 is congruent to 11 modulo 33, so the whole number has the same remainder as the sum of its digits.

And once you divide,

231=377=3711231 = 3 \cdot 77 = 3 \cdot 7 \cdot 11

so 231231 is composite, not prime.

Common Mistakes In Number Theory

Treating 11 As Prime

11 is not prime. A prime must have exactly two positive divisors, and 11 has only one.

Forgetting The Condition In Divisibility

The statement bab \mid a only makes sense with b0b \ne 0. Division by zero is not allowed.

Mixing Up Equality And Congruence

175(mod12)17 \equiv 5 \pmod{12} does not mean 17=517 = 5. It means they differ by a multiple of 1212.

Overusing Divisibility Rules

Some tests are quick because base-1010 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 462462. First use its digit sum to test divisibility by 33, 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 →