Number Theory has a long and exciting history. To help understand what Number Theory is all about, in this article, we describe a few basic ideas of Number Theory. From divisibility and mathematical induction to Euler’s theorem and solving polynomial congruence equations, Number Theory can be both highly practical and applicable yet also extremely difficult and abstract. Number Theory also provides us with a playground where students can master proof-writing while learning some very exciting applications of the theory. The Law of Quadratic Reciprocity and the much more recent Tonelli-Shanks algorithm are such examples.

## Introduction to Number Theory

Number Theory is a mathematical discipline concerned with the study of the natural numbers, also known as the positive whole numbers, or counting numbers. These are the numbers we all learn as children: 1, 2, 3, 4, 5, and so on. So, why would these be the object of a brand of higher mathematics? Surely we know everything there is to know about the natural numbers now, right? Well, not so fast.

Number Theory is concerned with the relationships between particular *subsets* of the natural numbers. Some examples of subsets would be the odd numbers, or the even numbers. The prime numbers are a subset – that is, a number greater than 1 whose only divisors are 1 and itself. The square numbers are the numbers whose square root is an integer: 1, 4, 9, 16, 25, and so on. Similarly, the cubes are the numbers whose *cube root *is an integer: 1, 8, 27, 64, 125, and so on. Many of these subsets will be familiar to you, but some will not. We will take a closer look at many such sets of numbers in the following articles.

### Questions Posed in Number Theory

Some examples of typical questions posed in number theory include “Can the sum of two squares be a square?” or “Are there infinitely many prime numbers?” We will look more closely at these and other such questions in the subsequent sections.

Let’s think about that first question for a moment. Can the sum of two squares be itself a square? If you think about it for a moment, the answer should be clear: $3^2 + 4^2 = 5^2$. So the answer to this question is “Yes!”. In fact, there are quite a few examples of squares that satisfy this requirement. These sets of square numbers have a special name: *Pythagorean triples*. However, can we say that same thing for cubes? Can the sum of two cubes be a cube? That’s a little trickier. What about higher powers? Can the sum of two fourth powers be itself a fourth power? We’re about to stumble on one of the most famous results in Number Theory. Let’s think about this a little more generally. Can the sum of two $n^{th}$ powers itself be an $n^{th}$ power, for *$n$* greater than 2?

### Famous Problems in Number Theory

In general, the answer is “No!”. A result that is known as *Fermat’s Last Theorem*, and even though it was postulated by Pierre de Fermat in 1637, it actually was not proven to be true until 1994. The product of 357 years of hard work by many, many mathematicians! Its proof opened a whole new world of approaches to many other problems in number theory and related disciplines. If that doesn’t inspire you to reconsider the usefulness and utter awesomeness of number theory, I don’t know what will.

Stick with us in the following articles, and we hope to show you that number theory is the most amazing thing you can do with the natural numbers since Sesame Street.

### The Importance of Mathematical Induction to Number Theory

One of the most useful, and basic, ideas used in Number Theory is Mathematical Induction. A proof technique that is very useful when working with the natural numbers, mathematical induction is a little like tipping over an infinite equally spaced line of dominos.

In order to utilize the Principle of Mathematical Induction, there are three steps which must be followed. First, the establishment of a “base case” – for example, if we suspect that a given statement is true for all natural numbers $n$, we should first check to see if it is true for one particular natural number – most often, this “base case” shows that a given statement is true when $*n=1$*. Once this is proven by example to be so, this becomes the case upon which we can build an *inductive hypothesis*.

### Induction Process

The second step in the induction process is to state an inductive hypothesis. To do this, we first make an assumption that our statement is true for some $n$. Now, you may think that this is something like assuming that our statement is true in general before we’ve proven it – however, this is not the case. Since we have established a base case, then we have to show that our statement is certainly true for *some* $n$ – even if $n=1$ is the only such $n$, this assumption is still valid.

From there, we can use induction to show that if our original statement is true for some *n*, then it must also be true for *$n+1$*. From there, all possible cases tip over like a line of dominoes. If a statement is true for 1, then it must be true for 2. If true for 2, then true for 3; and so on. In our article on the Principle of Mathematical Induction, we go into a little more detail on this subject, and present one of the “classic” induction proofs as an example.

### Special Integers

One well-known use of mathematical induction is proving various characteristics of sequences of numbers – and one of the most well-known sequences is the Fibonacci sequence. This sequence has appeared in popular culture from *The Phantom Tollbooth* to the Darren Aronofsky film *Pi*, and have been attributed to the legendary “golden ratio,” which is allegedly found throughout nature and in human creations since the dawn of time. So, what is this mystical sequence of integers?

### Fibonacci Numbers

Put simply, the Fibonacci sequence begins with 0 and 1, and then from there, each subsequent entry is the sum of the two previous. Stated symbolically, we can build the Fibonacci numbers $f_n$ with the following recursion: $f_0 = 0,$ $f_1=1,$ $f_n=f_{n-1}+f_{n-2}$ for $n > 1$.

You may notice that in order to calculate a given Fibonacci number $f_n$* _{,}* you have to know the values of the two previous Fibonacci numbers. Now, to calculate a relatively small Fibonacci number, it’s not too much of a problem to begin at 0 and work our way up. However, for large Fibonacci numbers this gets a little unwieldy. Thankfully, the Euler-Binet formula gives us a way to calculate a Fibonacci number without knowing the values of any of the others. Our article on the Fibonacci numbers has more information on this useful formula.

## Divisibility in the Integers

The concept of *divisibility* is one that is familiar to most people. We say that one number *a* is divisible by *$b$* if $\frac{a}{b} = c$, and $c$ is an integer. In other words, if you divide $a$ by $b$ and have a zero remainder, then *a* is *divisible* by $b$. Another way to say this, and write this, is with the notation $b \vert a$, which is read as “$b$ divides $a$.” Now, among the integers, we can do many operations to them: add, subtract, and multiply them, for example, and the sum, difference or product of any two integers will itself be an integer. However, the same is not true for division. Though 1 and 3 are integers, 1/3 is not. Some say that the study of Number Theory is the study of divisibility.

Any natural number $n$, then, will have a finite number of divisors. From this fact, we can talk about some other useful and interesting characteristics of divisibility. For example, for integers $a, b$, and $c$, if $a \vert b$ and $b \vert c$, then $a \vert c$. This and many other interesting properties of divisibility are discussed in our article on the subject.

### Prime Numbers

Related to divisibility are the concept of primes, and the idea of greatest common divisors. A prime number, of course, is a natural number greater than 1 whose only divisors are 1 and itself. The number 2 is prime, and has the distinction of being the only even prime. By definition, any even integer larger than 2 has 2 as a divisor, and is thus not prime. We know that there are infinitely many prime numbers – however, identifying them is not always easy. One of the classic methods to identify prime numbers is by using the *Sieve of Eratosthenes*, discussed in detail in our article on Prime Number Theorems. Additionally, central to the study of Number Theory is the fact that every natural number greater than one has at least one prime divisor – a fact that will turn out to be, in a word, *fundamental*!

If a number is not prime, then it must be composite. When comparing two composite numbers, it is natural, and often useful, to ask what these two numbers may have in common. The largest integer *c* that divides both integers *a* and *b* is called $\gcd (a,b)$, which is read, “The greatest common divisor of *$a$* and *$b$*.” This is another fact that seems relatively straightforward on the surface, and yet has surprising and useful implications in Number Theory. For example, the greatest common divisor of two given integers is always the least positive linear combination of these two integers. More on this concept in our article on the Greatest Common Divisor.

### Arithmetic has a Fundamental Theorem

Putting all of these Number Theory concepts together leads to something truly monumental in mathematics: The Fundamental Theorem of Arithmetic. Since we have mentioned that every natural number greater than 1 has at least one prime divisor, the Fundamental Theorem of Arithmetic goes even farther, and states this:

Every natural number *n* greater than 1 can be uniquely written in the form: $$n =p_1^{e_1} p_2^{e_1} \cdots p_k^{e_k}$$ where $p_1 < p_2 < \dots < p_k$* *are all prime numbers, and the $e_1 < e_2 < \cdots < e_k$ are natural numbers.

### Prime Numbers are Building Blocks

In other words, *every natural number greater than 1 can be written as a product of powers of primes!* That’s not only important – it’s vital! Without it, arithmetic would simply not work the way it does! You can read more about the Fundamental Theorem of Arithmetic and other topics related to divisibility below.

- Divisibility (In the Integers)
- Prime Number Theorems (Infinitude of Primes)
- Greatest Common Divisors and Their Importance
- Euclidean Algorithm (by Example)
- Fundamental Theorem of Arithmetic
- Diophantine Equations (of the Linear Kind)

## Congruence

Another important component of Number Theory, which many may be unfamiliar with, is the idea of *congruence modulo* $n$. What does this mean? In short, a set of numbers *modulo n* is a set that “resets” back to zero every $n$ units. Think about the odometer on your car. If you’ve ever driven a car for a long time, or otherwise owned a high mileage vehicle, you may have had an odometer that turned past the “100,000” mile mark, and clicked back to all zeros. If this has happened to you, your odometer operates modulo 100,000. Minutes and seconds work modulo 60, and if you measure the distance in degrees around a circle, you’ll find that the angles work modulo 360.

A little more abstractly, think about the integers modulo 5. That would include 1, 2, 3, 4, and 0 – once we get to 5, the sequence resets. To talk about congruence modulo 5 for any number, simply divide that number by 5: the remainder is the new value modulo 5. In other words, 13 is congruent to *3 modulo 5* – because when we divide 13 by 5, we have a remainder of 3.

### Congruence Makes Divisibility Questions Easier to Work With

Number Theorists use many theorems and lemmas related to congruence in order to learn many things about the way modular arithmetic works, and the way the natural numbers in general operate. Many such congruence theorems can be found in our article, Congruence Theorems and Their Proofs.

Another excellent example of congruence is in the days of the week, which can be expressed as an integer modulo 7. Using this, and a few other facts, there is a concise formula to determine the day of the week for any given date on the Gregorian calendar. Some of the many applications of congruence can be found in both abstract and applied interpretations of Number Theory.

### Yes, Number Theory Can Be Applied

For instance, divisibility tests rely on congruence theorems in order to help us quickly and easily determine if one number is divisible by another. One well-known example is the divisibility test for 3 (and powers of 3): a number *n* is divisible by 3 precisely when the sum of its digits is divisible by 3. This test is fairly straightforward and can often be performed mentally, but some are a little more involving.

Some other famous results related to congruence include Wilson’s Theorem, Fermat’s Theorem, and Euler’s Totient Function, which gives the count of numbers less than or equal to $n$ which are *relatively* *prime* to $n$ – that is, the count of every number *$a<n$* such that $\gcd (a,n) = 1$. For more details on these and other results related to congruence, consult the informative articles below.

- Congruence Theorems and Their Proofs
- Linear Congruences and Their Solvability
- Chinese Remainder Theorem (Examples Included)
- Polynomial Congruences with Hensel’s Lifting Theorem
- Applications of Congruence (Days of the Week)
- Fermat’s Theorem (and Wilson’s Theorem)
- Euler’s Totient Function and Euler’s Theorem
- Quadratic Congruences and Quadratic Residues
- Tonelli-Shanks Algorithm by Example

## Number Theory Brought to You By

Elementary number theory may very well be one of the oldest subjects of mathematics. Roughly put, number theory is the mathematical treatment of questions related to the integers; that is, the numbers $0, \pm 1, \pm 2, \pm 3 …$ and people have been manipulating them for thousands of years.

### The Ancients

The Ancient Greeks, in particular, Euclid (third century) and the Pythagoreans (sixth century B.C.) dedicated a considerable amount of attention to them; as well as Archimedes (third century). Indeed, one of the most important sets of numbers, the prime numbers; hold a key position in number theory since they are the building blocks of the integers; and perhaps the first question that comes to mind is whether there are infinitely many prime numbers. A proof of this amazing fact can be found in Euclid’s famous book: *The Elements*.

### The Masters

Pierre de Fermat and Leonard Euler rekindled interest in number theory in the seventeenth and eighteenth centuries by using new (among others, calculus-related) techniques to arrive at important new results. Each new theorem of course, has led to many new questions and conjectures; and one of the fascinating aspects of number theory is that many unresolved questions can be understood with only a minor background in the subject. Even today there are many open problems; and some have substantial rewards for a solution!

After Fermat and Euler, Carl Friedrich Gauss, one of the greatest mathematicians of all time, gave the first modern treatment of number theory. He defined the notion of congruence, and distinguished its importance; in fact, it’s his notation and approach of number theory that we use today. Gauss’s many achievements in number theory are well documented; and it’s Gauss who coined the phrase “number theory is the queen of the sciences”. Interestingly enough, even in an elementary course of number theory, other fields of mathematics can come into play, such as the complex numbers, geometry, and abstract algebra.

### Number Theory is Alive and an Active Area of Research

Erdos was one of the most prolific publishers of papers in mathematical history, comparable only with Leonhard Euler; Erdos published more papers, while Euler published more pages. He wrote around 1,475 mathematical articles in his lifetime, mostly with co-authors. He strongly believed in and practiced mathematics as a social activity, having 511 different collaborators in his lifetime.

A famous conjecture formulated in 1948 by Paul Erdos and Ernst Straus states that any fraction of the form $\frac{4}{n}$ where $n$ is a positive integer, can be rewritten as the sum of three unit fractions. It is believed that for $n>4$ unique solutions to the following Diophantine equation can be found $$\frac{4}{n}=\frac{1}{x}+\frac{1}{y}+\frac{1}{z}$$ where $x,y,$ and $z$ are positive integers.

We display several examples which were found by trial and error.

$\frac{4}{5}=\frac{1}{2}+\frac{1}{4}+\frac{1}{20}$

$\frac{4}{6}=\frac{1}{2}+\frac{1}{7}+\frac{1}{42}$

$\frac{4}{7}=\frac{1}{2}+\frac{1}{18}+\frac{1}{63}$

$\frac{4}{8}=\frac{1}{3}+\frac{1}{7}+\frac{1}{42}$

$\frac{4}{9}=\frac{1}{3}+\frac{1}{10}+\frac{1}{90}$

$\frac{4}{10}=\frac{1}{3}+\frac{1}{18}+\frac{1}{90}$

$\frac{4}{11}=\frac{1}{4}+\frac{1}{11}+\frac{1}{44}$

$\frac{4}{12}=\frac{1}{4}+\frac{1}{14}+\frac{1}{84}$

$\frac{4}{13}=\frac{1}{4}+\frac{1}{26}+\frac{1}{52}$

$\frac{4}{14}=\frac{1}{4}+\frac{1}{42}+\frac{1}{84}$

$\frac{4}{15}=\frac{1}{5}+\frac{1}{18}+\frac{1}{90}$

$\frac{4}{16}=\frac{1}{5}+\frac{1}{25}+\frac{1}{100}$

$\frac{4}{18}=\frac{1}{6}+\frac{1}{22}+\frac{1}{99}$

$\frac{4}{19}=\frac{1}{6}+\frac{1}{30}+\frac{1}{95}$

$\frac{4}{20}=\frac{1}{6}+\frac{1}{45}+\frac{1}{90}$

$\frac{4}{21}=\frac{1}{6}+\frac{1}{78}+\frac{1}{91}$

$\frac{4}{22}=\frac{1}{7}+\frac{1}{42}+\frac{1}{66}$

$\frac{4}{24}=\frac{1}{7}+\frac{1}{78}+\frac{1}{91}$

$\frac{4}{25}=\frac{1}{8}+\frac{1}{40}+\frac{1}{100}$

$\frac{4}{26}=\frac{1}{8}+\frac{1}{56}+\frac{1}{91}$

$\frac{4}{27}=\frac{1}{10}+\frac{1}{27}+\frac{1}{90}$

$\frac{4}{28}=\frac{1}{9}+\frac{1}{56}+\frac{1}{72}$

$\frac{4}{30}=\frac{1}{10}+\frac{1}{45}+\frac{1}{90}$

$\frac{4}{32}=\frac{1}{10}+\frac{1}{72}+\frac{1}{90}$

$\frac{4}{33}=\frac{1}{10}+\frac{1}{90}+\frac{1}{99}$

$\frac{4}{34}=\frac{1}{12}+\frac{1}{51}+\frac{1}{68}$

$\frac{4}{35}=\frac{1}{12}+\frac{1}{60}+\frac{1}{70}$

$\frac{4}{36}=\frac{1}{12}+\frac{1}{60}+\frac{1}{90}$

$\frac{4}{39}=\frac{1}{14}+\frac{1}{52}+\frac{1}{84}$

$\frac{4}{40}=\frac{1}{14}+\frac{1}{60}+\frac{1}{84}$

$\frac{4}{42}=\frac{1}{14}+\frac{1}{78}+\frac{1}{91}$

$\frac{4}{44}=\frac{1}{20}+\frac{1}{44}+\frac{1}{55}$

$\frac{4}{45}=\frac{1}{16}+\frac{1}{72}+\frac{1}{80}$

$\frac{4}{48}=\frac{1}{18}+\frac{1}{60}+\frac{1}{90}$

$\frac{4}{49}=\frac{1}{18}+\frac{1}{63}+\frac{1}{98}$

$\frac{4}{50}=\frac{1}{18}+\frac{1}{75}+\frac{1}{90}$

It suffices to find one counterexample to disprove the Erdos-Strauss conjecture. However, some people believe a counterexample will not be found. Consider, though that it suffices to check among the primes because if $n=p k$ where $p$ is a prime and if $$\frac{4}{p}=\frac{1}{x_0}+\frac{1}{y_0}+\frac{1}{z_0}$$ is known then $$\frac{4}{n}=\frac{4}{ k p}=\frac{1}{k x_0}+\frac{1}{k y_0}+\frac{1}{k z_0}.$$ So if the Erdos-Strauss conjecture is proven true for all prime numbers then it will also hold for all composite numbers.

$\frac{4}{5}=\frac{1}{2}+\frac{1}{4}+\frac{1}{20}$

$\frac{4}{7}=\frac{1}{2}+\frac{1}{15}+\frac{1}{210}$

$\frac{4}{11}=\frac{1}{3}+\frac{1}{36}+\frac{1}{396}$

$\frac{4}{13}=\frac{1}{4}+\frac{1}{18}+\frac{1}{468}$

$\frac{4}{17}=\frac{1}{5}+\frac{1}{30}+\frac{1}{510}$

$\frac{4}{19}=\frac{1}{5}+\frac{1}{114}+\frac{1}{570}$

$\frac{4}{23}=\frac{1}{6}+\frac{1}{161}+\frac{1}{966}$

$\frac{4}{29}=\frac{1}{8}+\frac{1}{87}+\frac{1}{696}$

$\frac{4}{31}=\frac{1}{8}+\frac{1}{372}+\frac{1}{744}$

$\frac{4}{37}=\frac{1}{10}+\frac{1}{148}+\frac{1}{740}$

$\frac{4}{41}=\frac{1}{12}+\frac{1}{82}+\frac{1}{492}$

$\frac{4}{43}=\frac{1}{12}+\frac{1}{129}+\frac{1}{516}$

$\frac{4}{47}=\frac{1}{13}+\frac{1}{156}+\frac{1}{564}$

$\frac{4}{53}=\frac{1}{14}+\frac{1}{371}+\frac{1}{742}$

$\frac{4}{59}=\frac{1}{16}+\frac{1}{236}+\frac{1}{944}$

$\frac{4}{61}=\frac{1}{16}+\frac{1}{488}+\frac{1}{976}$

$\frac{4}{67}=\frac{1}{18}+\frac{1}{402}+\frac{1}{603}$

$\frac{4}{71}=\frac{1}{20}+\frac{1}{284}+\frac{1}{355}$

$\frac{4}{73}=\frac{1}{20}+\frac{1}{292}+\frac{1}{730}$

The Erdos-Strauss conjecture remains an open problem.

If you’ve ever wondered if 46,548 is divisible by 7, then Introduction to Number Theory is for you.

## Introduction to Number Theory

Introduction to Number Theory is a friendly guide for the study of integers, proof writing, mathematical induction, divisibility, congruence equations, and more. This book is full of examples and exercises, perfect for undergraduate students studying math and computer science, as well as advanced high school students studying mathematics.

### The Natural Numbers

In the first chapter The Natural Numbers, readers will find two sections which are Mathematical Induction and Fibonacci Numbers. In the first section, we see a collection of other topics, such as the strong form of mathematical induction, the well-ordering axiom (principle), and the relationship between the two. The rest of the chapter is about Fibonacci numbers. The author introduces them, some identities, and gives several examples. Then, the author moves on to the Euler-Binet formula, the prime conjecture, and closes with how the Fibonacci sequence can grow.

### Introducing the Integers

The second chapter covers six main topics. They include divisibility, prime numbers, greatest common divisors, Euclidean Algorithm, Fundamental Theorem of Arithmetic, and Linear Diophantine Equations. In the first subsection, you will find that the author defines divisibility, then delves into the divisibility lemmas. After that, the Division algorithm is explained while using it in several examples. The section on prime numbers deals with the sieve of Eratosthenes, prime divisors, and infinitude of primes.

The third section on greatest common divisors has two subdivisions, i.e., Bezout’s identity and relatively prime integers. After the author introduces the Euclidean Algorithm in the next subsection, several lemmas are studied. The penultimate part of this chapter is about the Fundamental Theorem of Arithmetic. Within it, the author characterizes primes, provides proof of the Fundamental Theorem, and then visits the topic of least common multiples. The final section of the second chapter deals with Linear Diophantine Equations of different types, i.e., two and multivariable, and how to solve them.

### Any Introduction to Number Theory Should Concentrate on Congruence

The third chapter covers nine main topics and is the heart of the text. Of those, the first topic, the introduction to congruence, deals with other subtopics, which are the lemmas, least positive residues, and modular arithmetic. Then in the next section on linear congruence equations, the author describes how they can be solved and the inverse of an integer. After the exercises relevant to those topics, a detailed section on the Chinese Remainder Theorem is presented.

The author presents polynomial congruence equations, many examples, and how to solve them in the fourth part of the last chapter. Under it, you will also find congruence reduction and Hensel’s Lifting Theorem. Within the fifth part of the chapter are applications of congruence, such as divisibility tests and days of the week. It ends on practice questions, as well. The sixth part is based on special congruence equation. It delves into two theorems: Wilson’s and Fermat’s, before culminating on exercises.

The subsequent part of the third chapter covers Euler’s function, its properties, and how to solve equations related to it. It also details Euler’s theorem before ending on practice questions. The penultimate portion of this topic is about quadratic congruence equations. It is quite detailed since it includes general quadratic congruence, residues, characters, and the law of reciprocity. Besides those, you will also find portions dedicated to the Legendre Symbol and its properties and Euler’s and Gauss’s Criterion.

The final section is dedicated to Shank’s algorithm, several examples, and how it may be used to solve quadratic congruences.