The true work of the mathematician is not experienced until the later parts of graduate school, when the student is challenged to create knowledge in the form of a novel proof. It is common to fill page after page with an attempt, the seasons turning, only to arrive precisely where you began, empty-handed — or to realize that a subtle flaw of logic doomed the whole enterprise from its outset. The steady state of mathematical research is to be completely stuck. It is a process that Charles Fefferman of Princeton, himself a onetime math prodigy turned Fields medalist, likens to ‘‘playing chess with the devil.’’ The rules of the devil’s game are special, though: The devil is vastly superior at chess, but, Fefferman explained, you may take back as many moves as you like, and the devil may not. You play a first game, and, of course, ‘‘he crushes you.’’ So you take back moves and try something different, and he crushes you again, ‘‘in much the same way.’’ If you are sufficiently wily, you will eventually discover a move that forces the devil to shift strategy; you still lose, but — aha! — you have your first clue.

As a group, the people drawn to mathematics tend to value certainty and logic and a neatness of outcome, so this game becomes a special kind of torture. And yet this is what any ­would-be mathematician must summon the courage to face down: weeks, months, years on a problem that may or may not even be possible to unlock. You find yourself sitting in a room without doors or windows, and you can shout and carry on all you want, but no one is listening.

Within his field, Tao is best known for a proof about a remarkable set of numbers known as the primes. The primes are the whole numbers larger than 1 that can be divided evenly by only themselves and 1. Thus, the first few primes are 2, 3, 5, 7 and 11. The number 4 is not a prime because it divides evenly by 2; the number 9 fails because it can be divided by 3. Prime numbers are fundamental building blocks in mathematics. Like the chemical elements, they combine to form a universe. To a chemist, water is two atoms of hydrogen and one of oxygen. Similarly, in mathematics, the number 12 is composed of two ‘‘atoms’’ of 2 and one ‘‘atom’’ of 3 (12 = 2 x 2 x 3).

The primes are elementary and, at the same time, mysterious. They are a result of simple logic, yet they seem to appear at random on the number line; you never know when the next one will occur. They are at once orderly and disorderly. They have been incorporated into mysticism and religious ritual and have inspired works of music and even an Italian novel, ‘‘The Solitude of Prime Numbers.’’ It is easy to see why mathematicians consider the primes to be one of the universe’s foundations. From counting, you can develop the concept of number, and then, quite naturally, the basic operations of arithmetic: addition, subtraction, multiplication and division. That is all you need to spot the primes — though, eerily, scientists have uncovered deep connections between primes and quantum mechanics that remain unexplained. Imagine that there is an advanced civilization of aliens around some distant star: They surely do not speak English, they may or may not have developed television, but we can be almost certain that their mathematicians have discovered the primes and puzzled over them.

Tao’s work is related to the twin-prime conjecture, which the French mathematician Alphonse de Polignac suggested in 1849. Go up the number line, circling the primes, and you may notice that sometimes a pair of primes is separated by just 2: 5 and 7, 11 and 13, 17 and 19. These are the ‘‘twin primes,’’ and as the journey along the number line continues, they occur less frequently: 2,237 and 2,239 are followed by 2,267 and 2,269; after 31,391 and 31,393, there isn’t another pair until you reach 31,511 and 31,513. Euclid devised a simple, beautiful proof showing that there is an infinite number of primes. But what of the twin primes? As far as you go on the number line, will there always be another set of twins? The conjecture has roundly defeated all attempts at proving it.

When mathematicians face a question they cannot answer, they sometimes devise a less stringent question, in the hope that solving it will provide insights. This is the path that Tao took in 2004, in collaboration with Ben Green of Oxford. Twins are two primes that are separated by exactly 2, but Green and Tao considered a looser definition, strings of primes separated by a constant, be it 2 or any other number. (For example, the primes 3, 7 and 11 are separated by the constant 4.) They sought to prove that no matter how long a string someone found, there would always be another longer string with a constant gap between its primes. That February, after some initial conversations, Green came to visit Tao at U.C.L.A., and in just two exhilarating months, they completed what is now known as the Green-Tao theorem. It could be a way point on the path to the twin-prime conjecture, and it forged deep connections between disparate areas of math, helping establish an interdisciplinary area called additive combinatorics. ‘‘It opened a lot of new directions in research,’’ says Izabella Laba, a University of British Columbia mathematician who has worked with Tao. ‘‘It gave a lot of people a lot of things to do.’’