From pi to the Fibonacci sequence, poets' imaginations have been fired by the elegance of numbers – and mathematicians have returned the compliment

One, two, buckle my shoe,

Three, four, knock on the door...

Our first, toddling relationship to poetry often goes hand-in-hand with our first fascination with numbers. In learning to count and learning to rhyme, we begin to make sense of the world through patterns, making numbers run in sequence, connecting words with each other in all sorts of ways. And that's before we even get started with Lewis Carroll's recitation of the first 71 digits of pi using nonsense couplets as an aide-mémoire.

Despite the seeming opposition between poetry and mathematics - airy-fairy ethereal verse versus hard-headed number-crunching – poetry and maths have always gone together like, well, a partial derivative and a unit vector. From the Sulba sutras to the 0/1 binary rhythm of the iambic pentameter, there is an affinity between maths and poetry. And poets have had long love affairs with mathematics – be they paid-up mathematicians like Carroll or Omar Khayyám, or writers simply enchanted by the magic of maths like Edna St Vincent Millay or Emily Dickinson.

Contemporary poets have recently swamped the London Word festival site following a challenge to write the Golden Fib. The Fib is a poetic form (six lines, 20 syllables) cooked up by Gregory K Pincus and based on the Fibonacci sequence. So the syllables for each line run 1, 1, 2, 3, 5, 8.

Pincus's original Fib sums up (no pun intended) the mutual attraction of poetry and maths.

One

Small,

Precise,

Poetic,

Spiraling mixture:

Math plus poetry yields the Fib.



Mathematics, like poetry, is not simply a matter of adding and subtracting and – hey, presto! – getting the right answer all the time. The elegant equations of poetry and mathematics are, as Pincus's Fib tells us, precise and poetic. As Einstein put it: "Pure mathematics is, in its way, the poetry of logical ideas." Both poem and equation are indeed spiralling mixtures that take us on journeys of our own making – maths and poetry are not truths waiting to be discovered at the end of a spreadsheet, but man-made languages that open up our horizons of understanding.

For Galileo, "Philosophy is written in this grand book – I mean the universe – which stands continually open to our gaze, but it cannot be understood unless one first learns to comprehend the language and interpret the characters in which it is written. It is written in the language of mathematics …" Newton did not see his work as the answer to the grand book of the universe, describing himself "like a boy playing on the seashore and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me". Famously, the poet and artist William Blake's "spiritual" portrait of Newton shows the scientist plotting out the universe on such a seashore. Yet for the Nobel prize-winning poet Wisława Szymborska, the endless glories of the universe fade beside the infinity of pi: "Oh how brief – a mouse tail, a pigtail – is the tail of a comet!/ How feeble a star's ray bumping up against space", compared with pi, "nudging, always nudging a sluggish eternity/ to continue".

Pi – both Szymborska's poem and Archimedes's number – put to shame those superficial schools of "mathematical poetry" that mechanically suck the life out of both poetry and maths. I have never had, for example, much truck with the Oulipo poets, with their pointless, prescriptive and rather navel-gazing methodology, such as the S+7 formulation.

In contrast, to grasp pi takes a tremendous leap of imagination. It can't be written down – as Szymborska tells us, it "doesn't stop at the page's edge". Yet pi can be perfectly expressed by drawing a circle. And between the simple circle and infinity of pi, we find a truth about poetry and maths. Both poetic and mathematical genius are rooted in the actuality of our world while taking our imaginations far beyond. There is nothing mechanical about it. Poetry and mathematics both have many tales to weave. And that's no fibbing.