- algorithm Apollonian approximation art bar beauty binary binomial coefficients birthday book book review carnival Carnival of Mathematics Cassini chocolate combinatorics complex cookies counting decadic decimal diagrams divisibility elements expansion factorization fibonacci formula fractal game games gasket graph groups Haskell history hyperbinary idempotent identity integers interactive irrational Ivan Niven Lagrange lehmer lucas MaBloWriMo making Mersenne nim number numbers objects omega order pi prime primes problem programming proof puzzle rectangles repunit review sequence square squares strategy subgroups test triangular video visualization X
### Blogroll

### Fun

### Reference

### Categories

- algebra (43)
- arithmetic (56)
- books (28)
- calculus (6)
- challenges (51)
- combinatorics (8)
- complex numbers (5)
- computation (42)
- convergence (9)
- counting (29)
- famous numbers (48)
- fibonacci (18)
- fractals (12)
- games (24)
- geometry (40)
- golden ratio (8)
- group theory (26)
- humor (6)
- induction (7)
- infinity (17)
- iteration (23)
- links (73)
- logic (6)
- meta (40)
- modular arithmetic (24)
- number theory (67)
- open problems (11)
- paradox (1)
- pascal's triangle (8)
- pattern (72)
- people (20)
- pictures (44)
- posts without words (8)
- primes (31)
- probability (6)
- programming (17)
- proof (60)
- puzzles (11)
- recursion (12)
- review (19)
- sequences (28)
- solutions (28)
- teaching (11)
- trig (3)
- Uncategorized (4)
- video (19)

### Archives

- July 2016 (2)
- June 2016 (4)
- May 2016 (4)
- April 2016 (2)
- March 2016 (3)
- February 2016 (9)
- January 2016 (8)
- December 2015 (5)
- November 2015 (29)
- August 2015 (3)
- June 2015 (2)
- April 2015 (1)
- May 2014 (1)
- December 2013 (1)
- October 2013 (1)
- July 2013 (1)
- June 2013 (1)
- May 2013 (1)
- April 2013 (3)
- March 2013 (3)
- February 2013 (2)
- January 2013 (5)
- December 2012 (3)
- November 2012 (4)
- October 2012 (5)
- September 2012 (1)
- August 2012 (4)
- July 2012 (1)
- June 2012 (6)
- May 2012 (2)
- April 2012 (3)
- March 2012 (1)
- February 2012 (4)
- January 2012 (5)
- December 2011 (1)
- November 2011 (7)
- October 2011 (4)
- September 2011 (6)
- July 2011 (2)
- June 2011 (4)
- May 2011 (5)
- April 2011 (2)
- March 2011 (4)
- February 2011 (1)
- January 2011 (1)
- December 2010 (1)
- November 2010 (4)
- October 2010 (2)
- September 2010 (1)
- August 2010 (1)
- July 2010 (1)
- June 2010 (2)
- May 2010 (3)
- April 2010 (1)
- February 2010 (6)
- January 2010 (3)
- December 2009 (8)
- November 2009 (7)
- October 2009 (3)
- September 2009 (3)
- August 2009 (1)
- June 2009 (4)
- May 2009 (5)
- April 2009 (4)
- March 2009 (2)
- February 2009 (1)
- January 2009 (7)
- December 2008 (1)
- October 2008 (2)
- September 2008 (7)
- August 2008 (1)
- July 2008 (1)
- June 2008 (1)
- April 2008 (5)
- February 2008 (4)
- January 2008 (4)
- December 2007 (3)
- November 2007 (12)
- October 2007 (2)
- September 2007 (4)
- August 2007 (3)
- July 2007 (1)
- June 2007 (3)
- May 2007 (1)
- April 2007 (4)
- March 2007 (3)
- February 2007 (7)
- January 2007 (1)
- December 2006 (2)
- October 2006 (2)
- September 2006 (6)
- July 2006 (4)
- June 2006 (2)
- May 2006 (6)
- April 2006 (3)
- March 2006 (6)

### Meta

## Making tessellations

I just received my copy of Tessalation!, a great new book written by Emily Grosvenor and beautifully illustrated by Maima Widya Adiputri, which I helped fund on Kickstarter. It’s about a girl named Tessa who goes exploring in her backyard and finds all sorts of patterns, represented as fun tessellations. I’ve already had a lot of fun reading it with my four-year-old.

Most of the other math blogs in the blog tour for the book release are about early childhood math education, so I thought I’d write something in a slightly more advanced vein, exploring a bit of the underlying mathematics of making tessellations. My hope is that you’ll learn some things and also come away with ideas of new kinds of tessellations to explore. There is way more than I could ever fit in a single blog post (if you want to explore more, John Golden has a great list of resources on Math Hombre), but let’s see how far we get!

## Regular polygons

Let’s start with using *regular* polygons (that is, polygons whose sides and angles are all equal) to tile the plane. Most everyone is familiar with the idea that we can do this with regular (equilateral) triangles, regular quadrilaterals (*i.e.* squares), and regular hexagons:

- Every vertex of an equilateral triangle has an angle of , so six triangles can meet around every vertex to make a total of .
- Four squares meet around a vertex to make a total of .
- Three hexagons meet to make a total of .

In addition, the triangle and hexagon tilings are closely related, since we can get one from the other by subdividing the hexagons:

It’s easy to see that these are the only regular polygons that will work: regular pentagons have angles of , which does not evenly divide . And anything with more than six sides will have angles bigger than , so more than two of them will not be able to fit around a vertex.

## Modifying a square tessellation to make your own

Now, as explained in the back of Tessalation!, and as reproduced in this blog post on Kids Math Teacher, we can take a square tessellation and modify the squares to produce more intricate tessellations which still follow the same underlying pattern. In particular, if you add some shape to one side, you have to remove it from the opposite side, and vice versa. For example, beginning with a square, we might change the right side like this:

But if we do that we need to change the left side in a symmetric way:

Now the altered squares will still line up in a row:

Likewise, we can make symmetric modifications to the top and bottom, like so:

The resulting thingy can still tile the plane:

## Ants on donuts

So far so good. But if we take a step back to think about what’s really going on here, a whole world of possibilities opens up.

What we’ve really done with the square is match up certain edges, so that matching edges always meet in the tessellation.

Here I’ve marked the top and bottom edge both with a single arrow, and the left and right edges with a double arrow. (I’ve also put a letter “P” in the middle; I’ll explain why later.) In the tessellation, corresponding markings always have to match up. Like this:

Now, instead of matching up the edges of a bunch of copies of the same square, we can think about taking *one* square and gluing matching edges together. First, we glue the top and bottom edges together, resulting in a cylinder; then bend the ends of the cylinder around to match up the left and right edges, resulting in a torus (a donut shape).

Now imagine a very tiny ant who lives by itself on the surface of the torus. The ant is so small that it can’t tell that the surface it lives on is curved. To the ant, it just looks flat. (You may know some tiny creatures in a similar situation who live on a sphere.) Unlike those tiny creatures on the sphere, however, the ant has nothing it can use to draw with, no objects to leave behind, *etc.*, so it has no way to tell whether it has ever been to a particular location before. The ant starts walking around, exploring its world. Occasionally there is a straight line drawn on the ground, extending off into the distance. Sometimes it finds places where two lines cross at right angles. Sometimes it finds places where the ground is black, and after making some maps the ant realizes that these places are shaped like a giant letter “P”. After exploring for quite a while, the ant thinks its world looks something like this:

Or perhaps it lives on a torus? (Or an infinitely long cylinder?) The point is that there is *no way for the ant to tell the difference*. The ant cannot tell whether there are infinitely many copies of the letter “P”, or if there is only one letter “P” that it keeps coming back around to. So **a square tessellation is “what a torus looks like to an ant”**, that is, what we get if we cut open a torus and glue infinitely many copies together so that each copy picks up exactly where the previous copy left off.

But there are lots of ways to cut a torus open so it lays flat! And *all* of them will produce some shape which tiles the plane just like a square. This is another way to think about what we are doing when we modify matching edges of a square—we are really just cutting the torus along different lines.

## Onward

This blog post has gotten long enough so I think I will stop there! But I plan to write another followup post or three, because we have only just scratched the surface. In the meantime, I will leave you with some things to think about. First, what if we match up the edges of a square in a different way?

This is almost like the square from before, but notice that the arrow on the top edge is flipped. This means that we can’t just stack two copies of this square on top of each other, because the edges wouldn’t match:

But we can stack them if we flip one of the squares over, like this:

Finally you can see why I included the letter “P”—it lets us keep track of how the square has been flipped and/or rotated.

Can you complete the above to a tiling of the whole plane? What do such tessellations look like? Is it still possible to modify the edges to make other shapes that tile the plane in the same pattern?

How about this square?

Or this one?

Or this one?

And what about triangles and hexagons? What are different ways you can match up their edges to make tessellations? (Related challenge question: when we glue opposite pairs of sides on a square, we got a torus. If you glue opposite pairs of sides on a hexagon, what shape do you get?)

Happy tessellating!

Posted in books, geometry, pattern, pictures
Tagged blog, book, Tessalation, tessellation, tour, units
8 Comments

## The route puzzle

While poking around some old files I came across this puzzle:

(Click for a larger version.) I didn’t make it, and I have no idea where I got it from (do you know?). But in any case, wherever it comes from, I think it’s a really great puzzle. I did find the number that can make it through the diagram, but I never did completely finish proving that the solution is unique.

Can you solve it? Let’s see if we can prove it together. Please **don’t** post the **number** in the comments. But please **do** post proofs that certain combinations of nodes are impossible. For example, you might post a proof that no triangular number can be one more than a prime; that would mean the leftmost path is impossible.

Posted in arithmetic, challenges, number theory, proof, puzzles
Tagged cube, perfect, prime, puzzle, route, square, triangular
7 Comments

## The Recamán sequence

I recently learned about a really interesting sequence of integers, called the *Recamán sequence* (it’s sequence A005132 in the Online Encyclopedia of Integer Sequences). It is very simple to define, but the resulting complexity shows how powerful self-reference is (for both good and evil). Here’s the definition. The first term of the sequence is , and each term differs from by . Now, if were always just *more* than , we would have the triangular numbers:

Note how is one more than ; is more than ; is more than ; and so on.

But that’s not quite how the Recamán sequence is defined. In the Recamán sequence, “wants” to be *less* than : it will be so if is nonnegative and *has not already appeared in the sequence*. Otherwise, it “settles” for being *more* than (as with the triangular numbers).

So . Then:

- has to differ from by —that is, it must be or . But it can’t be negative, so it is.
- How about ? It must be away from , so either or —but again, it can’t be negative, so it is .
- Now, must be away from , so it must be or . is nonnegative, but it has already appeared in the sequence as , so we choose .
- So far, this is looking a lot like the triangular numbers! But let’s see what happens with . It must be , that is, either or . And here something different happens: is positive and has not appeared yet in the sequence, so .

Continuing this pattern, we get

From the definition, you might initially think that no number will ever be repeated: we explicitly avoid picking numbers that have already occurred in the sequence, right? Well, we don’t pick if it has already occurred, but in that case we definitely pick whether it has already occurred or not—and in fact sometimes it has. You don’t have to continue the sequence very much farther before you find, for example, .

Here’s a scatterplot of the first terms, with the -axis scaled by 1/2 to make it easier to see:

From the graph we can see that the numbers tend to form long parallel alternating runs where the top numbers are increasing by and the bottom decreasing. For example, we can see the first of these starting at :

This makes sense: we are alternately adding , then subtracting , then adding , then subtracting , and so on. The run will be broken when we hit a number that has already occurred: in this case, the number after is not , because that has already occurred, so instead it jumps up again to . After , it jumps up one more time (since was already in the sequence) and we get a very short parallel sequence before it falls back down and starts another alternating sequence .

So far, this looks regular-ish—one might hope to discover some regular patterns that could, for example, lead to a closed formula. But our hopes are dashed when we look further out in the sequence:

It doesn’t look very regular-ish anymore! And this is what I find fascinating about the Recamán sequence: the *self-reference* in its definition (we choose only when it has not already appeared) throws a giant monkey wrench of chaos into the works, so that it is very difficult to find any patterns or prove anything definite about it, even though it is still highly structured. To see what I mean, here’s a graph of the first 5000 terms:

There is most definitely structure—for example, all the terms seem to fall along these curving “bands” radiating out from the origin. I imagine one might even be able to say something approximate about the shape of those curves. But there is still obviously lots of chaos—it’s hard to discern any regular patterns.

So we know that the Recamán sequence is not 1-1: some numbers can appear multiple times. But is it *onto*? That is, does every number appear *at least once*, somewhere in the sequence? It is *conjectured* that this is true, but *no one knows*—it is an open question! According to the OEIS entry, after looking at the first terms, the smallest number that is still missing is ; every number smaller than that has appeared somewhere in the first terms of the sequence. Crazily though, is *still* missing after looking at the first terms!!! (That’s a staggeringly large number of terms; it is *far* more than the estimated number of atoms in the universe.) So perhaps the Recamán sequence is not onto after all—is there something special about so that it *never* apears? Or does it eventually appear *very very far* into the sequence? No one knows, and to be honest, I think the latter actually seems more likely. But it just underscores how difficult it would be to prove this.

Posted in arithmetic, recursion, sequences
Tagged difference, integers, Recamán, repeat, sequence
5 Comments

## Apollonian gaskets and Descartes’ Theorem II

In a few previous posts I wrote about “kissing sets” of four mutually tangent circles, and the fact that their *signed bends* satisfy *Descartes’ Theorem*,

(Remember that the *signed bend* of a circle is like the *curvature* , except that if one circle contains the other circles inside it, we give the outer circle a *negative* bend.)

As I explained previously, if we have the bends of three mutually tangent circles, we can compute the possible bends of a fourth circle using the formula , where is the sum of the other bends and

Moreover, the two solutions for have the property that

so if we have one of them we can easily “flip” to the other one. Doing these repeated “flips” results in an infinite tree of kissing sets, and drawing all of them (until they get too tiny to draw) results in an Apollonian gasket.

But the *bend* of a circle only tells us *how big* it is—how do we decide *where* to draw the circles?

In their paper “Beyond the Descartes Circle Theorem”, Jeffrey Lagarias, Colin Mallows, and Allan Wilks prove the following remarkable theorem. Let denote the signed bend of circle as before. Now let denote the *center* of circle *expressed as a complex number*. For example, if circle has its center at the point , then . Now here is the theorem:

That is, the *products* of the signed bend and complex center of each circle *also* satisfy Descartes’ Theorem! So for each circle we just keep track of the signed bend as well as the product of the signed bend and the center. For each operation we compute the same formula twice, once for the bends and once for the bend-center products. To recover the center of a circle, just divide the bend-center product by the bend. And voila!

As a result of this beautiful theorem, the code to generate the above picture is very short—we just have to implement a few formulas and apply them to both bends and bend-center products, and then recursively generate the tree of kissing sets I explained in a previous post.

I really wish I could explain the proof of this theorem, but alas, I do not understand it. Lagarias *et al.* go on to generalize the theorem four or five more times—the final theorem involves a matrix version of the equation for kissing sets of arbitrary -dimensional hyperspheres in spherical space, or something like that—and then prove the most general version using some sophisticated, abstract machinery. The generalized theorem implies the others, so it is technically a proof of the version of Descartes’ Theorem for bend-center products, but it doesn’t give much intuition into why it is true!

## Factorization diagram cards!

I’ve designed a set of factorization diagram cards and had them actually printed. This is one of the first times in my life when I have caused Actual Physical Objects to be created (other than using a printer I guess) so this is a pretty big deal for me! There’s still some kinks to work out with the design, but I hope to make decks of these cards available for purchase soon. I made a video of me opening the box, check it out:

Posted in arithmetic, counting, pattern, pictures, primes, teaching, video
Tagged cards, diagrams, factorization
4 Comments