Prime Numbers
Prime Numbers
Ramesh Sreekantan
ISI, Bangalore
December 1, 2014
Introduction - Prime Numbers
Prime numbers are the numbers 2,3,5,7......
These are natural numbers which cannot be divided by any
other positive number apart from themselves and 1.
Primes are important because they are the building blocks of the
numbers - all natural numbers are constructed out of them. So if
one understands the prime numbers one can understand a lot
about numbers in general.
The Alphabet
The are the alphabet which make up the numbers but unlike the
English alphabet - A,B,C,...,Z every word has precisely one spelling.
For example, in English, the word for this event would be either
PROGRAMME
or
PROGRAM
depending on which part of the world you are in - or perhaps
whether you chose English(UK) or English (USA) on your spell
checker...
Euclid
Such things don’t happen with prime numbers. There is a
beautiful theorem which is due to Euclid over 2000 years ago.
Euclid
Most of you must be aware of it as it is fundamental to much of
what you do in school - long division, multiplication, h.c.f, l.c.m
etc.
Euclid’s Theorem - The Fundamental Theorem of
Arithmetic
Theorem (Euclid)
Any positive integer greater than 1 can be uniquely written as
product of powers of prime numbers.
For example
10 = 2 × 5
3519 = 17 × 23 × 32
4294967297 = 641 × 6700417
So Euclid’s theorem says that there is precisely one way to spell a
number using the alphabet of primes.
Factorization
While the proof of Euclid’s theorem is not so difficult, in practice it
is not so easy to factor a number in to its prime factors.
This is exploited in encryption called the RSA algorithm in Public
Key Cryptography. It uses the fact that if p and q are two large
prime numbers and n = pq. if you make n public and you do not
know p and q it takes a long time to factor n. On the other hand,
if you know p or q it is quite easy.
So, the next time you use a credit card number over the internet
you should thank Euclid for saving it from being stolen !
Infinitude of Primes
We know that there are 26 letters in the English alphabet
How many prime numbers are there?
Every once in a while there is a newspaper headline stating
Largest prime number found!
If you read the article more carefully they talk about the largest
known prime number. Euclid proved that there are infinitely many
prime numbers – and the proof is not difficult, so I thought I would
discuss it here.
Euclid, once again
Theorem (Euclid)
There are infinitely many prime numbers.
Proof.
Suppose there were only finitely many primes, say r of them. Let
S = {p1 , p2 , . . . , pr } be the set of all prime numbers. Let
N = (p1 p2 . . . pr ) + 1
Then p1 does not divide N as when you divide by p1 the remainder
is 1. Similarly p2 , . . . , pr do not divide N. Hence N is not divisible
by any element of the set S. That means, either N is a prime
number or N is divisible by some prime p which is not in the set S.
In either case there is some prime number p which is not in the set
S. This contradicts the assumption that S was the set of all
primes. Hence there cannot be finitely many primes.
Largest Prime Number
So what is the biggest known prime? There is no known formula
for primes, in other words, there is no known increasing function f
such that f (n) is prime for n in some infinite set. So its not so
easy to find larger and larger primes. The French monk and
mathematician Marin Mersenne thought he had a formula
Mersenne Primes
He though that numbers of the form
Mp = 2p − 1
where p is a prime number are prime. For example,
M2 = 22 − 1 = 3, M3 = 23 − 1 = 7, M5 = 25 − 1 = 31
These are called the Mersenne numbers. This would give a
pretty easy way of getting larger and larger prime numbers!
Unfortunately, it is not true! For example,
M11 = 211 − 1 = 2047 = 23 × 89.
However, this is still a pretty good way to find primes and in fact
all large primes are found this way.
Largest Known Prime
The largest known prime number as of November 2014 is a
Mersenne prime
M57,885,161 = 257,885,161 − 1
discovered using GIMPS – the Great Internet Mersenne Prime
Search in 2013 – this has 17, 425, 170 digits!
I would have printed it out - but it would require 5000 sheets of
paper!
Fermat Primes
Another way of getting some primes are the Fermat numbers –
numbers of the form
n
Fn = 22 + 1
For example F0 = 3, F1 = 5, F2 = 17. However, these too are also
not prime always. As an exercise you can try to find the first one
which is not. As a further exercise you can try and show that
2n − 1 is not a prime if n is not a prime.
2n + 1 is not a prime if n is not a power of 2.
So the only hope for prime numbers of this type are the Mersenne
and Fermat numbers – though in fact there are very few known
Fermat primes.
Distribution of Prime Numbers
How are the prime numbers distributed amongst the natural
numbers?
The well known mathematician Don Zagier said
“Primes grow like weeds among the natural numbers, seeming to
obey no other law than that of chance but also exhibit stunning
regularity and that there are laws governing their behavior, and
that they obey these laws with almost military precision.”
From Euclid’s theorem we know that there are infinitely many
prime numbers but one can ask – what fraction of the numbers
are prime? Precisely, if
π(x) = Number of Primes ≤ x
so
π(x)
x
is the fraction of numbers that are prime.
Gauss
For example. π(1) = 0, π(2) = 1, π(3) = 2, . . . , π(100) = 25. One
might wonder what does this function look like ?
The great German mathematician Karl Friedrich Gauss
conjectured, when he was only around 15 or 16, that the function
π(x) behaves as follows
The Prime Number Theorem
π(x) ∼
x
loge (x)
where loge (x) is the natural log function and ∼ means that as x
gets larger this is a better and better approximation. For example,
100/ loge (100) = 21.71 while we saw π(100) = 25.
π(10000) = 1229 whlle 10000/ loge (10000) = 1086
In fact an even better approximation is given by the Logarithmic
Integral function
Z
Li(x) =
2
x
x
x
dt
=
+
+ ...
loge (t)
loge (x) (loge (x)2 )
The Prime Number Theorem
Here is a graph comparing the three functions as x gets large.
The green line is logx(x) , the red line is π(x) and the blue line is
e
Li(x). Notice how close the functions π(x) and Li(x) get!
These statements were proved about a hundred years later, in
1896, by French mathematicians Hadamard and de la
Vallée-Poussin independently, though using similar methods.
Unsolved Problems
There are a lot of problems in the theory of prime numbers which
are quite easy to state and understand but have so far evaded
proof. Here are a few
Are there infinitely many Mersenne Primes?
Twin prime conjecture – Are there infinitely many primes p
such that p and p + 2 are both prime?
Goldbach’s conjecture – Can every even number greater
than 2 be written as the sum of two prime numbers? More
generally, can every integer greater than 5 be written as a sum
of three prime numbers?
The Goldbach conjectures have been verified for numbers up to
4 × 1018 but unfortunately for mathematicians that does not
constitute a proof.
Unsolved Problems - Recent Progress
In the last couple of years there has been significant progress on
the last two questions. About a year and a half ago, Yitang Zhang,
a lecturer in University of New Hampshire, made progress on the
bounded gap conjecture. This states that for any natural
number k there exists infinitely many prime pairs (p, p 0 ) such that
p − p 0 = 2k. k = 1 is the twin primes conjecture.
Zhang proved it for some k < 70million. However, this was the
first time it was known for any k, so was significant progress. With
the help of an internet based collaboration initiated by Terry Tao,
the result has been brought down to k < 123.
Unsolved Problems - Recent Progress
What is remarkable about Zhang’s work is that his is not young –
he is about 58 years old! For many years he struggled with all
kinds of jobs, including working in ‘Subway’, but never gave up.
And his persistence finally yielded rewards.
There is a conjecture called the Ternery Goldbach Conjecture
which states that ‘Any odd integer > 7 can be written as a sum of
three primes’. This would be a consequence of the Goldbach
conjecture. This conjecture has been proved recently by Harold
Helfgott, a Peruvian mathematician of German descent.
Thank You!
I would like to thank Wikipedia for all the pictures used in this
presentation. Please feel free to contact me if you have any further
questions at
[email protected]
If you would like to contribute computer time to the Great Internet
Mersenne Prime Search, go to
www.mersenne.org
Thank you !
© Copyright 2026 Paperzz