It's hard to believe that something as simple as fifteen ordinary pendulums of varying lengths could be so mesmerizing:
Harvard Natural Sciences Lecture Demonstrations explains how it works:
The period of one complete cycle of the dance is 60 seconds. The length of the longest pendulum has been adjusted so that it executes 51 oscillations in this 60 second period. The length of each successive shorter pendulum is carefully adjusted so that it executes one additional oscillation in this period. Thus, the 15th pendulum (shortest) undergoes 65 oscillations. When all 15 pendulums are started together, they quickly fall out of sync—their relative phases continuously change because of their different periods of oscillation. However, after 60 seconds they will all have executed an integral number of oscillations and be back in sync again at that instant, ready to repeat the dance.
I find it fascinating how as you watch the video you see first one, then four, then three and two "strands" of beads moving about, with apparent periods of "randomness" in between. I'm sure the number theorists could explain what's going on in formal terms, but for me it's a lovely reflection of rationality in the number line, as common factors in the pendulum periods happen to line up throughout the cycle. It reminds me of driving past a field of grapevines (something I've been doing a fair bit recently): as the regular grid of stakes whizzes past, and you look through them at different angles, you can "see" the fractions in the number line as gaps through the stakes: 45° for 1:1, 33° for 1:2, etc. To me at least, the motion-blurred field looks like a number line with the major fractions cut out. Unfortunately, the effect doesn't come out in my still photos.
The webcomic xkcd has a different take on the number line.