## Friday, May 22, 2009

### Quadratic Number Spirals and Polygonal Numbers

Take the positive Integer number-line, place it in the xy plane (with zero at the origin), and wrap it counterclockwise around the origin so that the formerly straight number-line forms a spiral. Do this so that the square numbers (1, 4, 9, ...) all line up along the positive x axis one unit apart.

Equipped with this number spiral, you can now plot sequences of positive integers on it and, in some cases, interesting curves will emerge. NumberSpiral.com provides a nice overview of why some of these curves form the way they do.

Because of how we have wound our  number spiral, quadratic sequences are particularly nice to plot. So how can we possibly resist spiral-plotting the 2-dimensional polygonal numbers? The plots below are of the 2-dimensional k-polygonal numbers for = 3, 5, 12, and 13, that fall between 1 and 5000. Plotting two polygonal number sequences on the same spiral gives us a way to see some of the numbers for which the sequences overlap (they do this at what are called highly polygonal numbers). For example, it turns out that every hexagonal number is also a triangular number. The image below shows an overlay of both the k = 6 and k = 3 sequences - numbers that are both hexagonal and triangular are shown as large dots, while the non-hexagonal triangular numbers are smaller.

The square and triangular number sequences line up less exactly than the hexagonal and triangular example above, but their overlap represents a well-known sequence in its own right (Sloane A001110 - see also wikipedia). The square-triangular sequence comes up surprisingly often in recreational mathematics, including a recently in an article about inquisitive computing by Brain Hayes. In the image below, the square numbers are squares, the triangular numbers are dots, and those that are both show up as triangles (1, 36, and  1225 are shown).

The Fathom file used to create these spirals is available here.