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

**Plotting Pi and Searching for Mona Lisa**

This is a very nice video from Numberphile – where they use a string of numbers (pi) to write a quick Python Turtle code to create some nice graphical representations of pi. I thought I’d quickly go through the steps required for people to do this by themselves.

Firstly you can run the Turtle code on trinket.io. If you type the above code this will take the decimal digits of pi one at a time and for each one move forward 10 steps and then turn by 36 degrees times by that digit. So for example the 1 will lead to a right turn of 36 degrees and the 4 will lead to a right turn of 36 x 4 = 144 degrees.

Next it would be nice to have more digits of pi to paste in rather than type. So we can go to the onlinenumbertools website and generate as many digits of pi as we want. Select them to be comma separated and also to not include the first digit 3. You can then copy and paste this string in place of the 1,4,1 in the code above.

**1000 digits of pi**

If we run this program after pasting the first 1000 digits of pi we get (after waiting a while!) the above picture. There are a number of questions that they then raise in the video – if this program was ran infinitely long would the whole screen eventually be black? Would this create every possible image that can be created by 36 degree turns? Would it be possible to send this picture (say to an alien civilization) and for the recipient to be able to reverse engineer the digits of pi?

**2000 digits of pi**

If you increase the digits of pi to around 2000 you get the above picture. The graph spends a large time in the central region before finally “escaping” to the left. It then left my screen at the top.

**3000 digits of pi**

We can see that the turtle “returned” from off the top of the screen and then joined back up with the central region. This starts to look like a coastline – maybe the south of the UK!

**Different bases: Base 3**

We can consider the digits of pi in base three – which means that they are all equivalent to 0,1,2. This means that we can use these to specify either 0 degree, 120 degree or 240 degree turns. We can change the code as shown above to achieve this. Note the i%3 gives i mod 3. For example if the digit is 8, then 8 mod 3 is 2 (the remainder when 8 is divided by 3) and so this would turn 120 x 2 = 240 degrees.

This then creates a pattern which looks similar to the Sierpinski triangle fractal design:

**Base 4**

Using a similar method, we can create the following using a base 4 design:

This creates what looks like a map layout.

**Base 5:**

In base 5 the turtle quickly departed from my screen! With turns of 72 we don’t see the tessellating shapes that we do with base 3 and 4.

**Base 6:**

With a 60 degree turn we can now see a collection of equilateral triangles and hexagons.

You can explore with different numbers and different bases to see what patterns you can create!

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

**The Tusi couple – A circle rolling inside a circle**

Numberphile have done a nice video where they discuss some beautiful examples of trigonometry and circular motion and where they present the result shown above: a circle rolling within a circle, with the individual points on the small circle showing linear motion along the diameters of the large circle. So let’s see what maths we need to create the image above.

** Projection of points**

We can start with the equation of a unit circle centred at the origin:

and we can then define a point on this circle parametrically by the coordinate:

Here *t* is the angle measured from the horizontal.

If we then want to see the projection of this point along the y-axis we can also plot:

and to see the projection of this point along the x-axis we can also plot:

By then varying *t* from 0 to 2 pi gives the animation above – where the black dot on the circle moves around the circle and there is a projection of its x and y coordinates on the axes.

**Projection along angled lines**

I can then add a line through the origin at angle *a* to the horizontal:

and this time I can project so that the line joining up the black point on the edge of the large circle intersects the dotted line in a right angle.

In order to find the parametric coordinate of this point projection I can use some right angled triangles as follows:

The angle from the horizontal to my point A is *t*. The angle from the horizontal to the slanted line is *a*. The length of my radius BA is 1. This gives me the length of BC.

But I have the identity:

Therefore this gives:

And using some more basic trigonometry gives the following diagram:

Therefore the parametric form of the projection of the point can be given as:

**Adding more lines**

I can add several more slanted lines through the origin. You can see that each dot on the line is the right angle projection between the line and the point on the circle. As we do this we can notice that the points on the lines look as though they form a circle. By noticing that the new smaller circle is half the size of the larger circle, and that the centre of the smaller circle is half-way between the origin and the point on the large circle, we get:

We can the vary the position of the point on the large circle to then create our final image:

We have a connection between both linear motion and circular motion and create the impression of a circle rolling inside another.

You can play around with this demos graph here. All you need to do is either drag the black point around the circle, or press play for the *t* slider.

**More ideas on projective geometry:**

Ferenc Beleznay has made this nice geogebra file here which shows a different way of drawing a connection between a moving point on a large circle and a circle half the size. Here we connect the red dot with the origin and draw the perpendicular from this line to the other edge of the small circle. The point of intersection of the two lines is always on the small circle.

**Further exploration **

There is a lot more you can explore – start by looking into the Tusi Couple – which is what we have just drawn – and the more general case the hypocycloid.

**Essential Resources for IB Teachers**

If you are a **teacher** then please also visit my new site. This has been designed specifically for teachers of mathematics at international schools. The content now includes over **2000 pages of pdf content** for the entire SL and HL Analysis syllabus and also the SL Applications syllabus. Some of the content includes:

**Original pdf worksheets**(with full worked solutions) designed to cover all the syllabus topics. These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.**Original Paper 3 investigations**(with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.- Over 150 pages of
**Coursework Guides**to introduce students to the essentials behind getting an excellent mark on their exploration coursework. - A large number of
**enrichment activities**such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more. I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

**Essential Resources for both IB teachers and IB students**

1) Exploration Guides and Paper 3 Resources

I’ve put together a **168 page** Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission. Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator! I have also made **Paper 3 packs** for HL Analysis and also Applications students to help prepare for their Paper 3 exams. The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

**Rational Approximations to Irrational Numbers**

This year two mathematicians (James Maynard and Dimitris Koukoulopoulos) managed to prove a long-standing Number Theory problem called the Duffin Schaeffer Conjecture. The problem is concerned with the ability to obtain rational approximations to irrational numbers. For example, a rational approximation to pi is 22/7. This gives 3.142857 and therefore approximates pi to 2 decimal places. You can find ever more accurate rational approximations and the conjecture looks at how efficiently we can form these approximation, and to within what error bound.

**Finding Rational Approximations for pi**

The general form of the inequality I want to solve is as follows:

Here alpha is an irrational number, p/q is the rational approximation, and f(q)/q can be thought of as the error bound that I need to keep my approximation within.

If I take f(q) = 1/q then I will get the following error bound:

So, the question is, can I find some values of q (where p and q are integers) such that the error bound is less than 1/(q squared)?

Let’s see if we can solve this for when our irrational number is pi, and when we choose q = 6.

We can see that this returns a rational approximation, 19/6 which only 0.02507… away from pi. This is indeed a smaller error than 1/36. We won’t be able to find such solutions to our inequality for every value of q that we choose, but we will be able to find an infinite number of solutions, each getting progressively better at approximating pi.

**The General Case (Duffin Schaeffer Conjecture)**

The general case of this problem states that there will be infinite solutions to the inequality for any given irrational number alpha if and only if the following condition holds:

For:

We will have infinitely many solutions (with p and q as integers in their lowest terms) if and only if:

Here the new symbol represents the Euler totient. You can read about this at the link if you’re interested, but for the purposes of the post we can transform into something else shortly!

**Does f(q) = 1/q provide infinite solutions?**

When f(q) = 1/q we have:

Therefore we need to investigate the following sum to infinity:

Now we can make use of an equivalence, which shows that:

Where the new symbol on the right is the Zeta function. The Zeta function is defined as:

So, in our case we have s = 2. This gives:

But we know the limit of both the top and the bottom sum to infinity. The top limit is called the Harmonic series, and diverges to infinity. Therefore:

Whereas the bottom limit is a p-series with p=2, this is known to converge. In fact we have:

Therefore because we have a divergent series divided by a convergent one, we will have the following result:

This shows that our error bound 1/(q squared) will be satisfied by infinitely many values of q for any given irrational number.

**Does f(q) = 1/(q squared) provide infinite solutions?**

With f(q) = 1/(q squared) we follow the same method to get:

But this time we have:

Therefore we have a convergent series divided by a convergent series which means:

So we can conclude that f(q) = 1/(q squared) which generated an error bound of 1/(q cubed) was too ambitious as an error bound – i.e there will **not** be infinite solutions in p and q for a given irrational number. There may be solutions out there but they will be rare.

**Understanding mathematicians **

You can watch the Numberphile video where James Maynard talks through the background of his investigation and also get an idea what a mathematician feels like when they solve a problem like this!

**Essential Resources for IB Teachers**

If you are a **teacher** then please also visit my new site. This has been designed specifically for teachers of mathematics at international schools. The content now includes over **2000 pages of pdf content** for the entire SL and HL Analysis syllabus and also the SL Applications syllabus. Some of the content includes:

**Original pdf worksheets**(with full worked solutions) designed to cover all the syllabus topics. These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.**Original Paper 3 investigations**(with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.- Over 150 pages of
**Coursework Guides**to introduce students to the essentials behind getting an excellent mark on their exploration coursework. - A large number of
**enrichment activities**such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more. I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

**Essential Resources for both IB teachers and IB students**

1) Exploration Guides and Paper 3 Resources

I’ve put together a **168 page** Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission. Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator! I have also made **Paper 3 packs** for HL Analysis and also Applications students to help prepare for their Paper 3 exams. The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.