Wednesday, April 3, 2013

frames and octahedrals

Looking at a polka-dotted shower curtain the other day, I started to play a game of connect the dots. I was looking at "frames" of dots like the ones below, and counting the squares that could be made using only the dots on each frame as vertices.

So, consider an n by n square grid with points at each vertex and points one unit apart around the perimeter  For an such a grid, how many squares can be drawn by connecting 4 points on the perimeter of the grid, and what is the total area of all the squares drawn? Read no further if you want to do this yourself.


Counting the squares is pretty straight forward - for an grid with sides length n there will be n squares. There is the full n by n square formed by joining the vertices of the grid, and then a series of smaller rotated squares, the base of each formed by joining the ith point along the bottom with the (n-i)th point along the left side (consider the lower left corner to be the origin (0,0) and count to the right and up).

The areas of these squares are also easy to calculate, thanks to the right triangle that is made by the square and the frame that it is tilted in.


If you add up the areas for a given n, and look at the sequence that you get - you'll find that these give the octahedral numbers (OEIS A005900). A nice surprise (for me at least). Octahedrals are figurate numbers, like like polygonal numbers but in this case three-dimensional: two square-pyramidal numbers (OES A000330) stuck together to form an octahedron.

Figurate numbers have long been a favorite topic in recreational mathematics (there are several posts about them on this blog - like this one), and sometimes they show up when you are not expecting them.

The geometric aspect of figurate numbers sometimes allow you to express numerical relationships nicely using pictures. I don't think the picture below (which shows the n = 3 case) quite qualifies as "a proof without words", but I think it helps to show why the octahedral numbers pop out when you "draw squares on frames."