You are currently browsing the tag archive for the ‘primes’ tag.

**Prime Spirals – Patterns in Primes**

One of the fundamental goals of pure mathematicians is gaining a deeper understanding of the distribution of prime numbers – hence why the Riemann Hypothesis is one of the great unsolved problems in number theory and has a $1 million prize for anyone who can solve it. Prime numbers are the the building blocks of our number system and are essential to our current encryption methods such as RSA encryption. Hence finding patterns in the primes is one of the great mathematical pursuits.

**Polar coordinates**

The beautiful prime spiral was generated above on Desmos using polar coordinates. We can see a clear spiral pattern – so let’s see how to create this. Polar coordinates (r, θ) need a length (r) from the origin and an angle of anti-clockwise rotation from the origin (θ). So for example in polar coordinates (2,2) means a length of 2 from the origin and a rotation of 2 radians. By considering trigonometry and the unit circle we can say that the polar coordinates (r, θ) are equivalent to the Cartesian coordinate (r.cosθ, r.sinθ).

**Plotting prime pairs**

So we plot the first few prime pairs:

Polar: (2,2). Cartesian: (2cos2, 2sin2).

Polar: (3,3). Cartesian: (3cos3, 3sin3).

Polar: (5,5). Cartesian: (5cos5, 5sin5).

In Desmos (making sure we are in radians) we input:

We can then change the Desmos graph view to polar (first click on the spanner on the right of the screen). This gives the first 3 points of our spirals. Note I have labeled the points as polar coordinates.

I then downloaded the first 1000 prime numbers from here. I then copied this list of comma separated values and pasted it into an empty part of square brackets M = [ ] in Desmos to create a list.

I can then plot every point in the list as a prime pair by doing the following:

We can then generate our prime spiral for the first 1000 prime pairs:

Just to see how powerful Desmos really is, I then downloaded all the prime numbers less than or equal to 100,000 from here. This time we see the following graph:

We can see that we lose the clear definition of the spiral – though there are still circular spirals with higher densities of primes than others. Also we can see that there are higher densities of the primes on some of the radial lines out from the origin – and other radial lines where no primes appear.

**Prime Number Theorem**

We can also use our Desmos result to investigate another (more fundamental) result about the distribution of prime numbers. The prime number theorem states:

Here pi(N) is the number of prime numbers less than or equal to N. The little squiggle means that as N gets large pi(N) becomes better and better approximated by the function on the RHS.

For our purple “spiral” above we downloaded all the primes less than or equal to 100,000 – and Desmos tells us that there were 9,592 of them. So let’s see how close the prime number theorem gets us:

We can see that we are off by an error of around 9.46% – not too bad, though still a bit out. As we make N larger we will find that we get a better and better approximation.

Let’s look at what would happen if we took N as 1,000,000,000. From Wikipedia we can see that there are 50,847,534 primes less than or equal to 1,000,000,000. Therefore:

This time we are off by an error of only 5.10%. Have a look at the table of values in Wikipedia to find how large N has to be to be within 1% accuracy.

So this is a nice introduction to looking for patterns in the primes – and a good chance to explore some of the nice graphical capabilities of Desmos. See if you can find any more patterns of your own!

**How Are Prime Numbers Distributed? Twin Primes Conjecture **

Thanks to a great post on the Teaching Mathematics blog about getting students to conduct an open ended investigation on consecutive numbers, I tried this with my year 10s – with some really interesting results. My favourites were these conjectures:

*1) In a set of any 10 consecutive numbers, there will be no more than 5 primes. (And the only set of 5 primes is 2,3,5,7,11)
2) There is only 1 example of 3 consecutive odd numbers all being primes – 3,5,7
*

(You can prove both in a relatively straightforward manner by considering that a span of 3 consecutive odd numbers will always contain a multiple of 3)

**Twin Prime Conjecture**

These are particularly interesting because the study of the distribution of prime numbers is very much a live mathematical topic that mathematicians still work on today. Indeed studying the distribution of primes and trying to prove the twin prime conjecture are important areas of research in number theory.

The twin prime conjecture is one of those nice mathematical problems (like Fermat’s Last Theorem) which is very easy to understand and explain:

It is conjectured that there are infinitely many twin primes – ie. pairs of prime numbers which are 2 away from each other. For example 3 and 5 are twin primes, as are 11 and 13. Whilst it is easy to state the problem it is very difficult to prove.

However, this year there has been a major breakthrough in the quest to answer this problem. Chinese mathematician Yitang Zhang has proved that there are infinitely many prime pairs with gap N for some N less than 70,000,000.

This may at first glance not seem very impressive – after all to prove the conjecture we need to prove there are infinitely many prime pairs with gap N = 2. 70,000,000 is a long way away! Nevertheless this mathematical method gives a building block for other mathematicians to tighten this bound. Already that bound has been reduced to N <60,744 and is being reduced almost daily.

**Prime Number Distribution**

Associated with research into twin primes is also a desire to understand the distribution of prime numbers. Wolfram have a nice demonstration showing the cumulative distribution of prime numbers (x axis shows total integers x100)

Indeed, if you choose at random an integer from the first N numbers, the probability that it is prime is approximately given by 1/ln(N).

We can see other patterns by looking at prime arrays:

This array is for the first 100 integers – counting from top left to right. Each black square represents a prime number. The array below shows the first 5000 integers. We can see that prime numbers start to “thin out” as the numbers get larger.

The desire to understand the distribution of the prime numbers is intimately tied up with the Riemann Hypothesis – which is one of the million dollar maths problems. Despite being conjectured by Bernhard Riemann over 150 years ago it has still to be proven and so remains one of the most important unanswered questions in pure mathematics.

For more reading on twin primes and Yitang Zhang’s discovery, there is a great (and detailed) article in Wired on this topic.

If you enjoyed this topic, you may also like:

A post on synesthesia about how some people see colours in their numbers.

A discussion about the Million Dollar Maths problems (which includes the Riemann Hypothesis).

Essential resources for IB students:

Revision Village has been put together to help IB students with topic revision both for during the course and for the end of Year 12 school exams and Year 13 final exams. I would strongly recommend students use this as a resource during the course (not just for final revision in Y13!) There are specific resources for HL and SL students for both Analysis and Applications.

There is a comprehensive Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and then provides a large bank of graded questions. What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial. Really useful!

The Practice Exams section takes you to a large number of ready made quizzes, exams and predicted papers. These all have worked solutions and allow you to focus on specific topics or start general revision. This also has some excellent challenging questions for those students aiming for 6s and 7s.

Each course also has a dedicated video tutorial section which provides 5-15 minute tutorial videos on every single syllabus part – handily sorted into topic categories.

2) Exploration Guides and Paper 3 Resources

I’ve put together four comprehensive pdf guides to help students prepare for their exploration coursework and Paper 3 investigations. The exploration guides talk through the marking criteria, common student mistakes, excellent ideas for explorations, technology advice, modeling methods and a variety of statistical techniques with detailed explanations. I’ve also made 17 full investigation questions which are also excellent starting points for explorations. The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.