For centuries, memorizing the digits of pi has been an obsession for some people. Being an irrational number—meaning its digits go on for eternity in a seemingly random sequence—memorizing even a small portion of pi can be a tricky prospect.
There are many ways to memorize the digits of pi, most of which center around the use of a mnemonic technique, in which the length of each word in the mnemonic represents a digit in the pi sequence. (Pi begins with 3.1415, so the first word in the mnemonic would be 3 letters, the second 1 letter, the third 4 letters, and so on.) In fact, the use of mnemonics to memorize pi became so widespread that the practice has a name—Piphilology. Some short mnemonics for pi include “How I wish I could calculate pi” for the first seven digits and “May I have a large container of coffee?” for the first eight.
The most interesting bit of piphilology is the “piem”—a poem (not necessarily rhyming) that uses the mnemonic technique. One of the most famous piems was a baudy little ditty written by British mathematician Sir James Jeans in the early twentieth century, to remember the first 15 digits:
How I want a drink,
Alcoholic of course,
After the heavy lectures
Involving quantum mechanics.
However, the most ambitious piem was written by Mike Keith. The poem, based on Poe’s The Raven, gives the first 740 digits of pi. It begins:
Poe, E.: Near a Raven.
Midnights so dreary, tired and weary.
Silently pondering volumes extolling all by-now obsolete lore.
During my rather long nap—the weirdest tap!
An ominous vibrating sound disturbing my chamber’s antedoor.
‘This,’ I whispered quietly, ‘I ignore.’
Perfectly, the intellect remembers: the ghostly fires, a glittering ember.
Inflamed by lightning’s outbursts, windows cast penumbras upon this floor.
Sorrowful, as one mistreated, unhappy thoughts I heeded:
That inimitable lesson in elegance—Lenore—
Is delighting, exciting … nevermore.
Not satisfied with only 740 digits, Keith altered this poem and combined it with others to create a short story that includes the first 3,835 digits of pi. Called Cadaeic Cadenza, Keith draws on different pieces of literature to create this fantastic bit of constrained writing, including Hamlet, The Rubaiyat of Omar Khayyam, and the lyrics of the band Yes. You can read the entire Cadaeic Cadenza here.