Logo IMG
HOME > PAST ISSUE > Article Detail


Ode to Prime Numbers

Primes offer poetry both subject matter and structure

Sarah Glaz

Prime Culture

Prime numbers have applications in computational fields, including cryptography and statistics, as well as in many scientific domains, such as engineering and physics. They also offer what Richard Crandall and Carl B. Pomerance call, in their 2005 book Prime Numbers: A Computational Perspective, “cultural connections.” These cultural connections manifest themselves in poetry in a variety of ways.

The concept of primality is employed in poems as a metaphor for the intoxicating mysteries of life and human behavior. An example of this phenomenon is found in “Prime Numbers,” by Jim Mele.

Prime Numbers

Prime numbers,
I remember them
like drinks
following complicated folk laws.
Out in California
a friend visits a pebble
beach, indivisible
in this uncertain life.

—Jim Mele

The depth of the cultural connection between primes and poetry becomes more apparent when we examine the inclusion of specific prime numbers in poems. The affinity between numbers and words has roots in the invention of alphabetic writing by the Phoenicians in the 2nd millennium BCE, When numbers came to be denoted by letters of the alphabet. In ancient poetry, especially in the domain of magic, mysticism and divination, every word acquired the number value of the sum of its letters and every number attained the symbolic values of one or more words in whose spelling it appeared. Historian of mathematics David Eugene Smith notes that 3 and 7 “were chief among mystic numbers in all times and among all people.” This, he proposes, is because “3 and 7 are the first prime numbers—odd, unfactorable, unconnected with any common radix, possessed of various peculiar properties.” In other words, 3 and 7 acquired a special importance precisely because of their primality. Vestiges of such significance, combined with layers of cultural, sociological and historical meaning, allow prime numbers to evoke powerful images and emotions, both personal and collective. Poems featuring the prime number 7 exemplify this effect. Perhaps most notably, 7 appears in key religious texts. It shows up in the first poem of Genesis, the first book of the Bible, as well as in the New Testament, the Koran, and others. Seven also appears in the Epic of Gilgamesh—one of the earliest known works of literature, dated around 2,000 BCE. The contemporary poems “Reasons for Numbers,” by Lisel Mueller, and “How I Won the Raffle,” by Dannie Abse, reflect the layers of history and mystery that the number 7 carried with it into the present; both are excerpted below:


Because luck
is always odd
and the division
of history
into lean and fat

—Liesel Mueller, from “Reasons for Numbers”

I chose 7 because those ten men used to dance
around the new grave seven times.

Also because of the pyramids of Egypt;
the hanging gardens of Babylon;
Diana’s Temple at Ephesus;
the great statue of Zeus at Athens;
the Mausoleum at Halicarnassus;
the Colossus of Rhodes;
and the lighthouse of Alexandria.

—Dannie Abse, from “How I Won the Raffle”

An even earlier poem features 7 as a lucky number. Langston Hughes’s “Addition [1]” employs the form of a math problem to comment on the addition of “love” to “luck.”

Lewis Carroll’s classic poem, The Hunting of the Snark, mentions 7 in company of other numbers for an amusing mathematical effect. Do the math!

“Taking Three as the subject to reason about—
            A convenient number to state—
We add Seven, and Ten, and then multiply out
            By One Thousand diminished by Eight.

“The result we proceed to divide, as you see,
            By Nine Hundred and Ninety and Two:
Then subtract Seventeen, and the answer must be
            Exactly and perfectly true.

—Lewis Carroll, from The Hunting of the Snark

Aesthetics and Structure

Poems rarely call on prime numbers for their visual appeal. A notable exception is William Carlos Williams’s imagist poem, “The Great Figure.”

The Great Figure

Among the rain
and lights
I saw the figure 5
in gold
on a red
to gong clangs
siren howls
and wheels rumbling
through the dark city.

—Williams Carlos Williams

Williams’s poem makes clear the aesthetic quality of the figure 5 he describes. American artist Charles Demuth’s painting I Saw the Figure 5 in Gold was inspired by it. A series of multimedia works based on the poem are available at the website Poems that Go (

More often, numbers contribute to the structure of a poem. Poetry’s musicality depends not only on words but also on quantifiable structural elements, and formal poetry relies on counting: metrical feet, rhyme words, line length, number of lines in a stanza, number of stanzas in the poem and more. A certain amount of mathematical calculation, either formal or intuitive, is involved in free verse as well. And some nontraditional poetic structures and procedures rely explicitly on the mathematical properties of prime numbers.

One such technique employs the Fundamental Theorem of Arithmetic. To construct a poem using this theorem, you decide on the length of the poem and then number the poem’s lines consecutively from bottom to top, starting at 2. Then choose a word that stands for multiplication and a word that stands for exponentiation. The next step is to write the lines marked by prime numbers. Each line numbered with a prime is a building block of the other lines, much like the prime numbers build the positive integers. The first poem written with this structure was Carl Andre’s poem “On the Sadness.” My poem, “13 January 2009,” was also made using this approach. The form does not require the writer to note the mathematics that undergirds it, but in this instance the notation is part of the poem.

13                January 2009

12=22x3       Anuk is dying for Anuk is dying in the
                            white of winter
11                The coldest month
10=2x5         Anuk is dying in the falling snow
9=32            The white of winter for Anuk is dying
8=23            Anuk is dying for the white of winter
7                 The drift of time
6=2x3          Anuk is dying in the white of winter
5                 The falling snow
4=22            Anuk is dying for Anuk is dying
3                 The white of winter
2                 Anuk is dying
1                 .

—Sarah Glaz

Here the word in stands for multiplication, and the word for stands for exponentiation. The poem is generated from the prime numbered lines—2, 3, 5, 7, and 11, which are written first—as follows: Factor each nonprime line number into a product of powers of distinct primes. For example, 12 = 22 x 3. The primes appearing in the number 12, arranged in increasing order, are 2 and 3. Line 2 is: Anuk is dying, and line 3 is: The white of winter. To construct line 12, replace the number 2 with line 2, the number 3 with line 3, multiplication with in and exponentiation with for. This makes line 12: Anuk is dying for Anuk is dying in the white of winter. The same procedure is used to generate each line of the poem. When the poem is read aloud, the echo created by the repetition of prime-numbered lines evokes an elegiac mood.

Another method involves the aesthetic manipulation of very large primes. Jason Earls’s concrete prime poem, “Lighght Prime” (shown above) is based on Aram Saroyan’s poem, “Lighght.” (The history of this poem, which engendered considerable controversy when it was first published, is worth looking up.)

Click to Enlarge ImageEarls used zeroes and ones to create a visual representation of the poem. The word “lighght” appears in the interior of a rectangular array of digits, all of which are 0s and 1s. Taking the digits of this rectangular array and placing them in the same order on a straight line creates a long number. Multiplying this number by 101280, and then subtracting 1, yields a very large prime number. Verifying that this number is indeed prime involves the use of a computer program. Earls’s book, The Lowbrow Experimental Mathematician, includes additional information on this poetic form and more concrete prime poems.

Yet another technique for constructing poems involves the prime number 7. This method, called the n + 7 algorithm, was invented by the Oulipian poet Jean Lescure. The literary movement known as Oulipo—Ouvroir de Litterature Potentielle (Workshop of Potential Literature)—was founded by Raymond Queneau in 1960. Its members invented constraints that generate literature; many of these constraints are mathematical. The n + 7 algorithm replaces each noun in a given poem with the seventh noun that follows in a specified dictionary. Mathematically, the procedure is a function on the set of nouns—one that “translates” each noun by 7 units. The results are often amusing. Computer programs make it easy to run this algorithm on longer texts, and to do so using numbers other than 7. You can try out the procedure using a dictionary or at

Whether they are invoked as lucky numbers, employed as generative constraints, or just lauded in all their unruliness, primes in poetry lend both elegance and unpredictability. This dual nature—both exemplar and irritant—is familiar to poetry lovers. “Stay non-conformist, nuisance,” Spalding urges the primes. It’s a directive that the best poems often follow as well.


An earlier version of this essay appeared as “The Poetry of Prime Numbers” in the Proceedings of Bridges Coimbra, 2011, pp. 17–24. For permission to reprint their poems, we are thankful to Jim Mele and Jason Earls. “Addition [1]” is from The Collected Poems of Langston Hughes, by Langston Hughes, edited by Arnold Rampersad with David Roessel, associate editor, copyright 1994 by the estate of Langston Hughes. Used by permission of Alfred A. Knopf, a division of Random House, Inc. “The Great Figure,” from The Collected Poems of William Carlos Williams, vol. 1, 1909–1939, by William Carlos Williams, is copyright 1938 by New Directions Publishing and is reprinted by permission.


  • Abse, D. 2000. Be Seated Thou. Rhinebeck, New York: The Sheep Meadow Press.
  • Crandall, R. E., and C. Pomerance. 2005. Prime Numbers: a Computational Perspective. New York: Springer.
  • Earls, J. 2010. The Lowbrow Experimental Mathematician. Raleigh, NC: Pleroma Publications.
  • Gardner, M. 2005. Martin Gardner’s Mathematical Games CD: The 6th Book of Mathematical Diversions (1971). Washington, DC: Mathematical Association of America.
  • Glaz, S. 2010. “Poetry inspired by mathematics.” Proceedings of Bridges Pécs, 35–42.
  • Glaz, S. 2011. “13 January 2009.” Recursive Angel, May–June.
  • Glaz, S., and J. Growney, eds. 2008. Strange Attractors: Poems of Love and Mathematics. London: CRC Press/AK Peters.
  • Jennings, E., ed. 1961. An Anthology of Modern Verse 1940–1960. London: Methuen.
  • Mueller, L. 1986. Second Language. Baton Rouge: Louisiana State University Press.
  • Saroyan, A. 2007. Complete Minimal Poems of Aram Saroyan. New York: Ugly Duckling Presse.
  • Smith, D. E. 1958. History of Mathematics, volume II. Mineola, NY: Dover Publications.
  • Williams, W. C. 1985. Selected Poems of Williams Carlos Williams. New York: New Directions.

comments powered by Disqus


Subscribe to American Scientist