# Sandpiles, Prime Pages, and Six Dimensions of Color

Welcome to this week’s Math Munch!

Four million grains of sand dropped onto an infinite grid. The colors represent how many grains are at each vertex. From this gallery.

We got our first snowfall of the year this past week, but my most recent mathematical find makes me think of summertime instead. The picture to the right is of a sandpile—or, more formally, an Abelian sandpile model.

If you pour a bucket of sand into a pile a little at a time, it’ll build up for a while. But if it gets too tall, an avalanche will happen and some of the sand will tumble away from the peak. You can check out an applet that models this kind of sand action here.

A mathematical sandpile formalizes this idea. First, take any graph—a small one, a medium sided one, or an infinite grid. Grains of sand will go at each vertex, but we’ll set a maximum amount that each one can contain—the number of edges that connect to the vertex. (Notice that this is four for every vertex of an infinite square grid). If too many grains end up on a given vertex, then one grain avalanches down each edge to a neighboring vertex. This might be the end of the story, but it’s possible that a chain reaction will occur—that the extra grain at a neighboring vertex might cause it to spill over, and so on. For many more technical details, you might check out this article from the AMS Notices.

This video walks through the steps of a sandpile slowly, and it shows with numbers how many grains are in each spot.

A sandpile I made with Sergei’s applet

You can make some really cool images—both still and animated—by tinkering around with sandpiles. Sergei Maslov, who works at Brookhaven National Laboratory in New York, has a great applet on his website where you can make sandpiles of your own.

David Perkinson, a professor at Reed College, maintains a whole website about sandpiles. It contains a gallery of sandpile images and a more advanced sandpile applet.

Hexplode is a game based on sandpiles.

I have a feeling that you might also enjoy playing the sandpile-inspired game Hexplode!

Next up: we’ve shared links about Fibonnaci numbers and prime numbers before—they’re some of our favorite numbers! Here’s an amazing fact that I just found out this week. Some Fibonnaci numbers are prime—like 3, 5, and 13—but no one knows if there are infinitely many Fibonnaci primes, or only finitely many.

A great place to find out more amazing and fun facts like this one is at The Prime Pages. It has a list of the largest known prime numbers, as well as information about the continuing search for bigger ones—and how you can help out! It also has a short list of open questions about prime numbers, including Goldbach’s conjecture.

Be sure to peek at the “Prime Curios” page. It contains intriguing facts about prime numbers both large and small. For instance, did you know that 773 is both the only three-digit iccanobiF prime and the largest three-digit unholey prime? I sure didn’t.

Last but not least, I ran across this article about how a software company has come up with a new solution for mixing colors on a computer screen by using six dimensions rather than the usual three.

Dimensions of colors, you ask?

The arithmetic of colors!

Well, there are actually several ways that computers store colors. Each of them encodes colors using three numbers. For instance, one method builds colors by giving one number each to the primary colors yellow, red, and blue. Another systems assigns a number to each of hue, saturation, and brightness. More on these systems here. In any of these systems, you can picture a given color as sitting within a three-dimensional color cube, based on its three numbers.

A color cube, based on the RGB (red, green, blue) system.

If you numerically average two colors in these systems, you don’t actually end up with the color that you’d get by mixing paint of those two colors. Now, both scientists and artists think about combining colors in two ways—combining colored lights and combining colored pigments, or paints. These are called additive and subtractive color models—more on that here. The breakthrough that the folks at the software company FiftyThree made was to assign six numbers to each color—that is, to use both additive and subtractive ideas at the same time. The six numbers assigned to a given number can be thought of as plotting a point in a six-dimensional space—or inside of a hyper-hyper-hypercube.

I think it’s amazing that using math in this creative way helps to solve a nagging artistic problem. To get a feel for why mixing colors using the usual three-coordinate system is such a problem, you might try your hand at this color matching game. For even more info about the math of color, there’s some interesting stuff on this webpage.

Bon appetit!

# Harmonious Sum, Continuous Life, and Pumpkins

Welcome to this week’s Math Munch!

We’ve posted a lot about pi on Math Munch – because it’s such a mathematically fascinating little number.  But here’s something remarkable about pi that we haven’t yet talked about. Did you know that pi is equal to four times this? Yup.  If you were to add and subtract fractions like this, for ever and ever, you’d get pi divided by 4.  This remarkable fact was uncovered by the great mathematician Gottfried Wilhelm Leibniz, who is most famous for developing the calculus.  Check out this interactive demonstration from the Wolfram Demonstrations Project to see how adding more and more terms moves the sum closer to pi divided by four.  (We’ve written about Wolfram before.)

I think this is amazing for a couple of reasons.  First of all, how can an infinite number of numbers add together to make something that isn’t infinite???  Infinitely long sums, or series, that add to a finite number have a special name in mathematics: convergent series.  Another famous convergent series is this one:

The second reason why I think this sum is amazing is that it adds to pi divided by four.  Pi is an irrational number – meaning it cannot be written as a fraction, with whole numbers in the numerator and denominator.  And yet, it’s the sum of an infinite number of rational numbers.

In this video, mathematician Keith Devlin talks about this amazing series and a group of mathematical musicians (or mathemusicians) puts the mathematics to music.

This video is part of a larger work called Harmonious Equations written by Keith and the vocal group Zambra.  Watch the rest of them, if you have the chance – they’re both interesting and beautiful.

Next up, Conway’s Game of Life is a cellular automaton created by mathematician John Conway.  (It’s pretty fun: check out this to download the game, and this Munch where we introduce it.)  It’s discrete – each little unit of life is represented by a tiny square.  What if the rules that determine whether a new cell is formed or the cell dies were applied to a continuous domain?  Then, it would look like this:

Looks like a bunch of cells under a microscope, doesn’t it?  Well, it’s also a cellular automaton, devised by mathematician Stephan Rafler from Nurnberg, Germany.  In this paper, Stephan describes the mathematics behind the model.  If you’re curious about how it works, check out these slides that compare the new continuous version to Conway’s model.

Finally, I just got a pumpkin.  What should I carve in it?  I spent some time browsing the web for great mathematical pumpkin carvings.  Here’s what I found.

 A pumpkin carved with a portion of Escher’s Circle Limit. A pumpkin tiled with a portion of Penrose tiling. A dodecapumpkin from Vi Hart.

I’d love to hear any suggestions you have for how I should make my own mathematical pumpkin carving!  And, if you carve a pumpkin in a cool math-y way, send a picture over to MathMunchTeam@gmail.com!

Bon appetit!

# Knots, Torus Games, and Bagels

Welcome to this week’s Math Munch!

The things we have lined up for you this week have to do with a part of math called topology.  Topology is like geometry in many ways, except the shapes you study aren’t rigid.  Instead, you can twist, stretch, squish, and generally deform them in any way you like, so long as you don’t rip any holes or attach things that weren’t already attached.  One of the reasons why topology is interesting is that you get to play with new and fascinating shapes, like…

… knots!  This nifty site, Knot Theory Online, is full of interesting information about the study of mathematical knots and its history and applications.  For some basic information, check out the introduction to knots page.  It talks about what a knot is, mathematically speaking, and some ways that mathematicians answer the most important question in knot theory: is this knot the unknot?  The site also has some fun games in which you can play with transforming one knot into another.  Here’s my favorite: The Hunt for the Elusive Trefoil Knot.

Knots can also be works of art – and this site, Knot Plot, showcases artistic knots at their best.  Here are some images of beautiful decorative knots.

A really cool thing about knot theory is that it is a relatively new area of mathematical research – which means that there are many unsolved knot theory problems that a person without a lot of math training could attempt!  Here’s a page of “approachable open problems in knot theory,” compiled by knot theorist and Williams College professor Colin Adams.

One of a topologist’s favorite objects to study is one that you might encounter at breakfast – the torus, or donut (or bagel).  To get a sense for what makes a torus topologically interesting and for what life might be like if you lived on a torus (instead of a sphere, a topologically different surface), check out Torus Games.  Torus Games was created by mathematician Jeff Weeks.  You can play games that you’d typically play on a plane, in flat space – such as Tic-Tac-Toe, chess, and pool – but on a torus (or a Klein bottle) instead!

A maze – on a torus!

By the way, you can find Torus Games and other cool, free, downloadable math software on our new page – Free Math Software.  You’ll find links to other software that we love to use – such as Scratch and GeoGebra, and another program by Jeff Weeks called Curved Spaces.

All this talk of tori making you hungry?  Go get your own tasty torus (bagel), and try this fun trick to slice your bagel into two linked halves.  This topologically delicious breakfast problem was created by mathematical artist George Hart.

Bon appetit!  (Literally, this time.)