[Verse 1] Take a number, any number, let's call it a Pick a prime we'll call it p, the magic formula Raise that number to the power of p minus one Something beautiful happens when the math is done [Chorus] Round and round the clock we go Powers cycling, ebb and flow p minus one will bring us home To one again, no matter where we roam Fermat knew the secret code Every power finds its road Back to one in modular time Fermat's Little Theorem sublime [Verse 2] Multiply the set from one to p minus one By our number a, see what we have done Every element gets shuffled to a different place But the same set emerges, just a different face [Chorus] Round and round the clock we go Powers cycling, ebb and flow p minus one will bring us home To one again, no matter where we roam Fermat knew the secret code Every power finds its road Back to one in modular time Fermat's Little Theorem sublime [Bridge] Like a clock that ticks away Counting down from p minus one to one When the cycle's complete today We're right back where we begun Permutations rearrange But the product stays the same In this modular exchange Mathematics plays its game [Verse 3] Seven to the sixth in mod seven space Equals one, returns to its starting place Five to the fourth in mod five you'll see Comes back to one inevitably [Chorus] Round and round the clock we go Powers cycling, ebb and flow p minus one will bring us home To one again, no matter where we roam Fermat knew the secret code Every power finds its road Back to one in modular time Fermat's Little Theorem sublime [Outro] When the prime divides the power When the cycle's complete Fermat's theorem in its hour Makes the pattern so sweet a to p minus one Always equals one In the modular sun
← Fundamental Theorem of Arithmetic (The Atomic Theory of Numbers) | Quadratic Reciprocity (The Secret Handshake) →