0% found this document useful (0 votes)
5 views

Prime Numbers Essay

This document explores the fascinating properties and patterns of prime numbers, detailing their historical significance and mathematical foundations established by ancient mathematicians like Euclid. It discusses various theorems, including the Fundamental Theorem of Arithmetic and Dirichlet's Theorem, while also examining modern applications such as cryptography and statistical analysis. The essay highlights the unpredictable yet patterned nature of primes, showcasing their relevance in both theoretical mathematics and practical real-world scenarios.

Uploaded by

kgpv4bsd9f
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Prime Numbers Essay

This document explores the fascinating properties and patterns of prime numbers, detailing their historical significance and mathematical foundations established by ancient mathematicians like Euclid. It discusses various theorems, including the Fundamental Theorem of Arithmetic and Dirichlet's Theorem, while also examining modern applications such as cryptography and statistical analysis. The essay highlights the unpredictable yet patterned nature of primes, showcasing their relevance in both theoretical mathematics and practical real-world scenarios.

Uploaded by

kgpv4bsd9f
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Prime Numbers: Unpredictably

Predictable
By Uma Abbas 30/03/24

1. Introduction
2, 3, 5, 7, 11…
This particular sequence has been embedded in our brains since primary
school. ‘Prime numbers. How exciting!’ These are words that I am sure you
have heard before. But are they really true? What is it about prime
numbers which makes your maths teacher’s eyes light up? Why are they
so exciting?
In this essay, I will embark with you on a journey through the properties
and patterns of prime numbers. From their origins thousands of years ago
to their continuous study today, they have not only shaped the very
mathematics we learn, but they have immense applications in the real
world, some of which we shall explore.

1. The bedrock of numbers


Since ancient times, mathematicians have quested to find the incredible properties of prime numbers.
In Book VII of his Elements, Euclid (an ancient Greek mathematician in around 300BC) defined a prime
as a number ‘measured by a unit alone’ i.e. the only proper divisor is 1. From here, he derived several
theorems which provide the basis of number theory. Some of the main propositions and proofs
involving primes were:

1.1. Euclid's lemma


‘If a prime p divides the product ab of two integers a and b, then p must
divide at least one of those integers a or b’.
A proof by strong induction can be used, where the symbol ‘|’ means ‘is a factor of’:
Let n|ab where n and a are coprime. We must prove n |b.
There is an integer q such that nq = ab
Without loss of generality, let n,q, a and b be positive integers (divisibility is independent of signs). Our
induction hypothesis is that we suppose the theorem has been proven for all positive values below
ab. There are three cases:
a) If n=a, because they are coprime n=1 and so n definitely divides b
b) If n<a we can rearrange nq=ab to nq-bn = ab-bn which factorises to n(q-b) = (a-n)b
Because a and n are coprime, (a-n) and n are coprime so n cannot divide (a-n) so n must divide b,
a conclusion following from our induction hypothesis as 0<(a-n)b<ab
c) If n>a you can similarly rearrange nq=ab to get (n-a)q = a(b-q).
By the same argument (n-a) and a are coprime. 0<a(b-q)<ab and our induction hypothesis implies
(n-a) divides (b-q) which can be written as r(n-a)=(b-q) for some integer r. Therefore, ar(n-a)=a(b-
q) so ar(n-a)=(n-a)q which simplifies to ar=q. Because ab=nq, and nq = n(ar), ab=nar. Dividing by a
gives b=nr, which proves n|b

1.2. Fundamental theorem of arithmetic


Also known as the ‘unique factorisation theorem’ this states that any whole number can be uniquely
factored into the product of primes in only one way e.g. 28 = 2 x 2 x 7 and no other decomposition
exists. A proof by contradiction is as follows:
Let n = p1p2p3…pj…pk where p1 ≤p2≤p3≤…≤pk and each p is prime (prime factorisation of n)
Let n = q1q2q3…qi…qm where q1≤q2≤q3≤…≤qm and each q is prime (prime factorisation of n)
p1|q1q2…qm so p1|qi by the lemma and since p1 and qi are both prime p1=qi
Assume p1≠q1
q1| p1p2…qk so q1|pj by the lemma and since q1 and pj are both prime q1 = pj
Since p1 ≠ q1 and q1 = pj  p1 ≠ pj
By the ordering of p’s p1<pj as they are not equal  p1<q1
Since p1 ≠ q1 and p1 = qi  q1 ≠ qi
By the ordering of q’s q1 < qi q1 < p1
So p1<q1 and q1 < p1 which is contradiction so assumption that p1≠q1 is false so p1=q1, which can be
extended to prove p2= q2 and p3= q3 etc. therefore there is only one unique prime factorisation for any
number n.

1.3. There is an infinite number of primes


Being arguably one of the most elegant proofs in all of mathematics, Euclid uses proof by
contradiction to show this:
Assume there is a finite list of all primes and let this be p1, p2, p3,…, pn

(p1⋅p2⋅p3⋅…⋅pn)+1
Consider the number N obtained by multiplying all prime numbers together and adding one  N =

N is either prime or not prime – if it is prime then we have found a new bigger prime number and the
original list was not complete. If is not prime, by the lemma there is a prime which perfectly divides it.
However this prime cannot be one of the known primes in the original list as dividing N by any of the
known primes would give remainder 1, therefore there is a contradiction which proves the
assumption that there are a finite number of primes false.

1.4. Perfect numbers


If the series 1 + 2 + 4 + 8 +…+ 2k sums to a prime then the number N = 2k(1 + 2 + 4 + 8 +…+ 2k) must be
perfect i.e. it equals the sum of its proper divisors. For example, 7 = 1 + 2 + 4 and is prime so 28 = 4(1 +
2 + 4) must be perfect (28=1+2+4+7+14).

Therefore, for centuries prime numbers have provided the building blocks for the arithmetic we know today.
The more modern definition of a prime number is ‘a positive integer >1 that has no positive integer divisors
other than 1 and itself’. Conversely, composite numbers are non-prime positive integers.

2. Patterns and properties of primes


Although the distribution of primes is random and not formulaic, over thousands of years mathematicians have
uncovered many astonishing patterns and properties of prime numbers which suggests an underlying sense of
regularity and perfection and has led to new discoveries in many different areas of mathematics. Here I will be
focussing on the three I find most fascinating, however I encourage you to look into further patterns:

2.1. The spiral dance of primes


2.1.1. Graphing prime numbers
When you plot the primes as polar coordinates (in the form (r, θ) where r is distance
from origin and θ is the angle in radians the line makes with the x-axis) where each
prime p has coordinates (p,p) the distribution of these points seems quite random
and disorderly at first as you would expect with their unpredictable nature.
However, when you zoom out, a stunning pattern forms: 20 magnificent spirals
seem to swirl around the origin to form a galactic pattern. Zooming out even more, a
different, larger pattern of 280 lines (mostly in groups of 4) shoot out the origin.
Despite this mesmerising beauty, there seem to be gaps in the pattern.

Figure 1: Polar
coordinates
Figure 2: Three different magnifications of prime numbers plotted as polar coordinates

What is going on here?


First let’s see why spirals form in the first place:
 Consider all whole numbers plotted as polar coordinates to form what is
called an Archimedean Spiral.
 Zooming in, 6 little spirals appear. Each spiral corresponds to a residue class
mod 6, i.e. the numbers in each class have the same remainder when
divided by 6: 6k, 6k+1, 6k+2 etc.. Principally, this is because going up by 6
involves a turn of 6 radians ≈ 2π radians (a full turn) so is nearly a full turn
around the origin, only slightly missing it, so points going up by 6 give the
illusion of slightly curving lines.
 Even more precisely, going up by 44 is even closer to a whole number of
Figure 3: A close up of the
turns as 44 radians / 2π radians = 44/2π = 7.0028… so 44 larger and less residue class mod 6 of the
curved spirals for the 44 different residue classes mod 44 appear when form 6k
you zoom out even more: Each number in the class differs by only a slight
angle larger than a full turn. Interestingly, 44/22π ≈ 7 can be rearranged to say approximately
π=22/7.
 710 radians is even closer to a whole number of turns (710/2π=113.000009…), which can
approximate pi even more accurately to π=355/113 and also means going up by 710 gives
nearly the exact same angle from the origin so on an even larger scale 710 almost straight
lines appear to come out of the origin.

So why are there gaps?


When limited to prime numbers only, only 2/6 little spirals remain with the forms 6k+1 and 6k+5. This
is because prime numbers cannot be even (6k, 6k+2, 6k+4) or multiples of 3 (6k+3) (except 2 and 3
themselves).

For the 44 larger spirals, all even residue classes mod 44 e.g. 44k, 44k+2 etc. and multiple of 11
residue classes e.g. 44k+11, 44k+33 etc. are removed (except 2 and 11 themselves) as 2 and 11 are the
prime factors of 44 so you could pull them out of the respective classes making numbers in these
classes composite:
e.g. 44k+11 ≡ 11(4k+1)

Figure 4: Before and after the 44 spirals are limited to prime numbers only
So, only spirals corresponding to residue classes that do not share any prime factors with 44 remain.
There are 20 of these and they are known as coprime (i.e. greatest common divisor is 1) to 44 or
Φ(44)=20 where Φ is Euler’s totient function. This new piece of notation counts the number of
positive integers less than n which are coprime to n. It does this by performing the following
calculation to filter out multiples of 2 and 11, the prime factors of 44:
Φ(44)= 44(1/2)(10/11) = 20
More generally:
If n=p1r1p2r2…pkrk where all pi are distinct primes
Φ(n)=n(1-p1)(1-p2)…(1-pk)

For the 710 lines at a larger scale, when the coprime residue classes mod 710 are removed (multiples
of 2, 5, 71 except these numbers themselves), only 280 lines remain as Φ(710)=280
Figure 5: Before and after the 710 lines are limited to prime numbers only

Within each remaining spiral after these residue classes are removed, the prime numbers seem
sporadically distributed in each spiral. Moreover, the prime numbers seem to be evenly distributed
within each spiral, an observation which relates to an important idea in number theory: Dirichlet’s
theorem.

2.1.2. Dirichlet’s theorem


‘If a and b are coprime positive integers, then there are infinitely many
primes of the form na+b’.
i.e. each remaining spiral (which corresponds to a residue class mod n) will continue forever. Proven
by Dirichlet in 1837. Of course, the proof itself is far too difficult to include here, involving the use of
complex analysis, however more positively this theorem has practical applications in the real world
such in Bayesian statistics, being a conjugate prior.

2.2. Benford’s Law


Linking closely to Dirichlet’s theorem, another astonishing pattern has been found: The distribution of
the leading digit of primes can be described by a generalisation of Benford’s Law, a discovery which
has applications in many areas like stock market analysis and fraud detection. Let’s take a closer look.

Benford’s Law (1938) describes the distribution of leading digits of numbers (1-9) in many different data sets,
from the lengths of rivers to population numbers. Understandably, you might expect this to be a random or
uniform distribution of 11% for each digit, since there seems no reason for it not to be. However, it is actually
logarithmic, with 1 being the first digit 30% of the time, and the following digits appearing even less:

Figure 6: A graph to show the distribution of


leading digits according to Benford’s Law

Figure 7: A table showing the distribution of


leading digits in a range of different data sets
from nature’s rivers to death rates
For decades it has been known that in very large data sets,
the first digit distribution of primes is almost uniform. However, Luque and Lacasa from Spain realised
that in smaller intervals of primes, there is a clear bias in this distribution; As the size of the data set
increases to infinity, a uniform distribution is approached.
By analysing multiple sets of intervals [1, 10d], it was observed that as d increases, the change in first
digit distribution of primes became more uniform and seemed to follow a size-dependent Generalised
Benford’s Law (GBL), a more flexible model which is distinctly characterised by one parameter - the
power-law exponent – which can be applied to a range of data sets like stock market prices to prime
numbers. In 2009, Luque and Lacasa showed that there is a parameter value for which this adapted
model fits the first digit distribution of primes with incredible accuracy. The model also describes the
trend of the distribution becoming more uniform as d increases.
From this single discovery about prime numbers, several
applications have arose: Other sequences which did not follow
Benford’s Law but could follow GBL were able to be identified, and
applications from Benford’s Law could also be generalised for GBL in
fraud detection:
Whilst leading digits in naturally generated data in financial records,
tax returns and decision-making documents obey Benford’s Law,
fraudulent data does not since people falsifying data do not usually
track the frequencies of the fake leading digits producing an
unnatural distribution. Figure 8: A graph to show the difference
in first digit distribution in natural vs
falsified hypothetical ledger data

2.3. Twin prime conjecture


‘Twin primes’ are pairs of primes that differ by 2, such as (3,5), (5,7), (29,31) etc.. As numbers get
larger, gaps between primes get larger so twin primes occur less frequently. The conjecture states that
there are infinitely many twin primes, and that there exists every possible gap between them.
Intuitively, the random distribution of primes suggests this to be true, however despite substantial
progress in this proof, it remains unsolved. One notable idea is that computational evidence shows
that the distribution of twin primes seems to follow a pattern known as the Hardy-Littlewood
conjecture, however this has also not been proven yet. Whilst the study of these enigmatic pairs
seems quite theoretical, it actually has practical applications in cryptography to generate secure
encryption keys (more on this in part 4)

3. Further Applications of primes


By exploring only a few of the many patterns that prime numbers create, it is clear that these
discoveries can offer a range of applications in other areas of maths as well as in real world scenarios.
Another more direct application of primes is in cryptography:
 RSA encryption involves scrambling secret coded messages that can only be unscrambled by the
receiver and no one else who might intercept them, which usually requires a key for scrambling which
the receiver uses in reverse to unscramble, making the key the weak link in data security if it were to
end up in the wrong hands.
 To combat this, in 1976, the Diffie-Hellman key-exchange protocol was invented, based on the fact
that it is difficult to calculate the discrete logarithm modulo a large prime number p, that is finding z
from gz mod p. For example, let the two parties trying to communicate be Jen and Bob. They first
agree on the prime modulus p and primitive element g. Jen then picks a random number x and sends
a=gx modp to Bob and likewise Bob picks a random number y and sends b=gy modp to Jen. Bob
computes ay mod p = gxy mod p and Jen computes bx mod p=gxymod p so that they both have the key:
the value of gxy mod p. This cannot be computationally solved by the attacker, protecting the data,
however the only downfall to this method is it is subject to vulnerability when exchanging the
numbers x and y.
 In 1977 Rivest, Shamir and Adleman discovered a different way primes could be used in RSA
encryption: A public key could be easily made by you taking 2 large prime numbers, each containing
up to 80 digits, and multiplying them together to form a larger non-prime number which can only be
broken down into the 2 original primes (and 1 and itself) . This makes the scrambling process easy as
only knowledge of the large non-prime number is required, which could be published for anyone to
send encrypted messages, however the unscrambling process would be nearly impossible without
knowledge of the two original primes, which only you would know. Even the world’s most powerful
computers would take years to find the large prime factors, which by that point would be useless as
the key would have been changed, making it almost impossible to decode the encrypted data.

4. Conclusion
In the vast entirety of mathematics, prime numbers represent the most pure and profound beauty and
complexity that numbers can possess: Their seemingly random properties and remarkable patterns have
captivated mathematicians for centuries; I believe it is their element of unpredictability that adds to the allure,
sending mathematicians off on a journey in attempt to understand these enigmas. From providing the building
blocks of number theory to having significant practical applications in the real world, these humble numbers
are a constant rendition of grandeur in the mathematical world.

To be able to convey their sheer importance and supremacy in one essay would be an impossible task: From
having strong ties to the Riemann Hypothesis, one of the most famous unsolved maths problems, to closely
linking to the Fibonacci sequence and the natural world, there are endless more paths to traverse in pursuit of
these numbers. Having only voyaged through a few of these, I hope I was able to impart my passion for primes
and their incredible applications to you. They can appear in the most unexpected places so always be on the
lookout; Whilst your journey of understanding primes, like many others, may not have a destination in sight,
the views along the way are simply unparalleled.

5. Bibliography
1. Štefan Porubský: Basic Properties of Primes, 2009 BasicPropertiesPrimes
(cas.cz)
2. William Dunham Number theory - Euclid, Prime Numbers, Divisibility |
Britannica
3. D. Lazard, 2024 Euclid's lemma - Wikipedia
4. W. Rose, 2021 Discrete Math - Proof of Uniqueness of Prime Factorization
(youtube.com)
5. S.Hugtenburg 2.4: Proof by Contradiction - Engineering LibreTexts
6. Simon Singh, 1997, Fermat’s Last Theorem pg 100, 101, 104, 105
7. 2024, Prime number patterns: Discovering Intriguing Patterns in Prime
Numbers - FasterCapital
8. 3blue1brown, 2019 Why do prime numbers make these spirals? |
Dirichlet’s theorem and pi approximations - YouTube for figures 2,3,4 and 5
and part 3.1.
9. M.Penn 2019, Number Theory | A Formula for Euler's Totient Function (youtube.com)
10.B.Whitfield, 2023The Dirichlet Distribution: What Is It and Why Is It Useful? | Built In
11.L.Zyga, 2009New Pattern Found in Prime Numbers (phys.org)
12.L.Barabesi and L. Pratelli, 2020On the Generalized Benford law -
ScienceDirect
13.J.Frost Benford’s Law Explained with Examples - Statistics By Jim for figure
6 and 7
14.E. Kessel 2020 Benford's Law: Potential Applications for Insider Threat
Detection (cmu.edu) for figure 8
15.R.Wright 2007Diffie-Hellman Key Exchange - an overview | ScienceDirect
Topics
16.2023, Explained: Why are mathematicians obsessed with prime numbers?
- Times of India (indiatimes.com)

You might also like