To Hardy, mathematics was first and foremost a creative art. “The mathematician’s patterns, like the painter’s or the poet’s, must be beautiful,” he wrote in his classic 1940 book A Mathematician’s Apology. “Beauty is the first test: there is no permanent place in the world for ugly mathematics.”

