Prime Phyllotaxis Spirals

March 18, 2012

The phyllotaxis spiral is one of the classical forms of mathematics, and there is a wonderland of resources available online both images and explanations. The basic idea is to put points round in a spiral with the same angle between each point. This gives a family of forms:

Note that, as the angle changes the dots sometimes pack in better than others, this can actually be studied and the best packing is related to the golden ratio. The points in this spiral are placed down in order, so we can associate each to a whole number:

Now when I see a lit of numbers like this, I want to pull out the primes, see what pattern they make:

There are some hints at patterns, lets expand out, and look just at dots:

There seem to be spiral arms which are richer in prime numbers than others. We can analyse things further by colouring each number depending on its prime factors. The more prime factors the lighter the number, giving the image for the start of this post:

Now there is a clear pattern, light and dark arms spiraling out. Can we understand this pattern?

Think about the construction of a phyllotaxis pattern we turn the same angle every time, that means within a particular pattern we can find other phyllotaxis patterns. The one at twice the speed, three times the speed and so on.  For example we could dive our pattern into two patterns each with twice the rotation angle. This gives:

All prime number (other than 2) are odd, so they must lie on the subspiral corresponding to the odd numbers. In addition it turns out that the spiral arms that we see are related to the Fibonacci numbers (themselves closely linked to the Golden Ratio). The particular curves we see relate to 144. Here is the spiral given by multiples of 144, pulling out just one such curve:

Note that in the prime factor picture this curve gives a very light line as every number in it is a multiple of 144, and 144 itself has 6 prime factors (three twice and two four times). Taking the multiples of 6 instead of 144 (which gives us several of these curves as 6 divides 144) we see another pattern of lines that are light in the image:

More importantly the curves next to these ones give numbers one more or less than a multiple of six. Every prime number has this form (all other numbers are multiples of 2 or 3 or both). This gives the curves of prime numbers we saw.

So by considering the construction of the initial image it begins to reveal its secrets. Yet, just as with the primes on their own there seems to be plenty of mystery left for investigation…


2+2 = 1? Patterns in Modular arithmetic

November 20, 2011

When someone is talking about the absolute truth of mathematics and declares that once you have defined 2 and +, then 2+2 must equal 4, there is a slightly glib response:

but 2+2 = 1…Mod 3

Despite this surprise, we actually all use modular arithmetic regularly, quite literally on a daily basis. When we consider six hours after 8am, the answer is not 14, but 2pm. Well you could argue for using a 24 hour clock, but no one would claim that 3am on a Tuesday morning is really 27:00 on Monday (well apparently some do, thanks to kuromagi on reddit for ref) In these cases we are not counting as we usually do, but counting on a circle mod 12 or 24. It is not hard to see that we could do this with other numbers. if we do decide that 2+1 is 0, and not 3 we are now working mod 3. In this case 2+2 is 1, as is 2*2. We can put together a small table:

+ 0 1 2
0 0 1 2
1 1 2 0
2 2 0 1

Showing what happens when the values for the column and row are added together. We can make the same table for multiplication:

x 0 1 2
0 0 0 0
1 0 1 2
2 0 2 1

I have to admit these table are a little boring, we can make things more interesting by replacing the numbers by colours. As we are working with modular arithmetic we know that the range of numbers we will come across, lies between 0 and the value we are using for modulus, so we can map these onto some circle of colours. So work mod 151 we get a new table for addition:

Using the same system of colours we can do the same thing for multiplication:

Which is starting to get interesting. We do not need to stop there, we can produce an image where the row number is taken to the power of the column:

This looks a little jumbled, in fact it seems to have very little structure at all. This is not very useful if our goal is to make pretty images, and on this blog that is normally the goal, but it other areas it turns out to be incredibly useful. The process of modular exponentiation is an essential part of public key cryptography, one of the technologies that allows secure communication over the internet. The jumble and lack of pattern that we can see is a sign that modular exponentiation is a good method to use to jumble things up. if there were structure that could be used to help decrypt the messages!

Returning to images, lets make a big version of the multiplication image, mod 1583 (you need to click it to get the full effect, scaling the image down blurs out a lot of structure):

Another option is to make an animation. what happens as we move the modulus value:

There is plenty to study in these images, for example, the curves that can be seen are approximately hyperbolae as they occur when x*y is some fixed value. The central star point occurs in the middle of the image, and there are further stars at 1/3, 2/3, 1/4, 3/4 etc. Can you work out why?

The appearance of hyperbolae perhaps implies that other curves might be possible. What happens if we consider x^2 + y^2? An obvious guess from this formula would be circles and we indeed get (for 151):

Playing around a little further this image comes from x^2 - y^2 +3 x y:

These images are certainly worth repeating for 1583 (again the details get blurred out, so click the images to see the full detail):

To finish let us consider something even simpler. Taking the value of a square to be \frac{x \mod y}{y} this will always give a value between 0 and 1. We can then colour again, and animate with \frac{x \mod Q y}{y} and Q going from 5 to 0:

I first came across these patterns in the December Issue of notices of the AMS, I have always been surprised how little they have been explored. This post is my attempt to do a little to correct that.


Mathematical Scales

November 6, 2010

Thanks to the move to the US, my son has a new piano teacher. He is playing at an advanced level, beyond grade 8 (for the UK audience), with pieces by Bach, Mozart and Chopin often ringing out. Yet for the last couple of months he has been taken right back to the basics. Looking again at simple techniques on how fingers hit the keys and going over scales.

I am in love with this idea of training, taking someone who has proved incredibly able in an area and taking them back to the most basic ideas. I started to wonder what the equivalent might be for mathematics. What exercises should we be giving to starting PhD students?What exercises could we ourselves try in order to gain intuition and insight into the basic workings of our subject. I have a first proposal, but am sure there are others? What do you think? Of the idea itself, or of suggestions of possible exercises?

Multiplication Exercise

Multiply all possible pairs of numbers from 1 to 99, that is 4950 different calculations. At a conservative estimate of 120 per hour (most will be a lot quicker than 30s, some will be longer!) that is just over 40 hours work. That could spread quite nicely over a month, maybe two along with other activities. It would be 40 hours of meditation on the most fundamental of mathematical operations, what might come from that?
Other suggestions

A couple of excellent suggestions from commentors in a lively debate on reddit:

1) Teaching, which of course is already a significant part of graduate training in the US, unfortunately less so in the UK (those being the two systems I have worked in).

2) Deep study of proofs, with mention of this beautiful paper of Dykstra.


Use of Mathematics and Hyperscopes

July 27, 2009

The new “Use of Mathematics” A-level has been hotly debated recently. I would like to start by saying that I agree that things need to be done on this topic. There are some deep issues in the Mathematical culture in Britain and this A-level is aimed at addressing them. A good account of this is given in the open letter sent by ACME to various political figures.

Although changes need to be made, however, we need to be careful about nature of this change.  The proposal at the moment is too much about fitting numbers into equations.  (See Tim Gowers’ analysis). One way to think about the new A-level is that it could play a role similar to “Classical Civilization” when compared to Latin and Greek. This is already slightly troubling as the perception could easily be that this is a light-weight maths.  However there is a good argument for Classical Civilization as interesting history of Ancient Greece and Rome, that informs so much of our culture is made accessible without the language barrier.  Is the same true of mathematics, are there useful mathematical tools that are hidden behind a complex language?  I do not think so, and I will illustrate that with an example. But first some pretty pictures!

Images from a Hyperscope

IMG_0869IMG_0873IMG_0872IMG_0867

A hyperscope is a hyperbolic kaleidascope. It has five mirrors arranged in a pentagon. However the mirrors are not flat. Each is bent so that they meet at 90 degrees. Forming this shape:

Right angled pentagon

Right angled pentagon

As the mirrors meet at 90 degrees there are precisely four chambers round each corner, but as they are bent each chamber is a slightly different shape to the last. The result is a glimpse into the negatively curved world of the Hyperbolic plane.

Using one red mirror shows how the extra hyperbolic space is folded away to fit in Euclidean space.

Using one red mirror shows how the extra hyperbolic space is folded away to fit in Euclidean space.

In order to make this I wanted to use standard A4 acrylic mirrors, so I did not need to do any cutting. Each mirror is placed into a groove cut into a piece of MDF, and the mirrors have to fit tightly at the corners. I was therefore faced with a problem. I knew the width of my mirrors but they would be bent, so I needed to make this the distance round a circular arc.  Now let us assume I have successfully completed “Use of Maths” A-level and I recognise this as a mathematical problem. I go onto the world’s best source of equations (wikipedia) to see if I can find anything. In real life I did exactly that, as I am lazy and wanted the answer quick. Unfortunately the ratio between the length of a cord (a line between two points on a circle) and an arc (the curve between two points) is not given.  A couple of google searches later and I gave up.

I gave up as I had a better option. I could just work it out myself. It is not hard, just involving a little trigonometry.  I illustrate with an image. The arc is labelled A, the radius r and the cord C, the angle is \theta. An additional line splits C in two and gives two right angled triangles. Which should hint to the answer.

Arc-cord-ratio

This example is to me “Use of mathematics”. I had a practical problem and wanted to solve it. There was a little trick to realising the tools I needed to solve it, but after that the mathematics was basic. In fact I was lucky enough to have learned all the mathematics I needed here by the time I was 13.  As someone who is perhaps more thoughtful than pratical I have to confess that my perfect calculations failed on “Use of the real world” and the mirrors had 1mm too little space. Luckily such things can be bodged.

If we are going to invest the money in developing a new A-level, therefore, let us play on those practical connections that mathematics has and get people involved in them. Some people, like I did, become engaged in the logic and clarity of maths itself. However for most it is only when they find out how it can solve a problem for them that it becomes interesting. So lets get people building mathematical toys to illustrate trigonomety and geometry. Designing fabric patterns to show symmetry. Working with the basics of google’s pagerank algorithm to show the power of linear algebra. Encoding and decoding messages to learn about factoring prime numbers.  With a little imagination we should be able to cover the whole syllabus.

There is even a model for what we might want to achieve. The Salter’s A-level in Chemistry is a full Chemistry A-level. It is not “Use of Chemistry” as it covers the full criteria (subjects the A-level must cover). However the teaching starts with the applications and moves back to the theory. The theory is therefore seen in a wider context from the start.  Why are we being less ambitious for maths? Is the subject really only accessible to some people? Can’t we find the ways to motivate children to put in the hard work required to gain useful and beautiful insights? We need the changes in the maths syllabus to make a real difference and not just make things look good so the numbers show the problem is getting better.


Follow

Get every new post delivered to your Inbox.

Join 213 other followers