Even though individual primes pop up unexpectedly, their distribution follows a trend. It's like tossing a coin. The result is unpredictable, but after many coin tosses we expect roughly half heads and half tails. So, for example, about 4 per cent of numbers smaller than ten billion are prime. So far so good.
Numbers are products of pure logic, and so surely they ought to behave in a precise, regular way.
Mathematicians would at least like to know how far the prime numbers stray from the distribution. Georg Riemann found a vital clue. In 1859, he discovered that the secrets of the primes are locked inside something called the zeta function. Complex numbers can be visualised as arrayed on the complex plane, with real numbers on the horizontal axis and imaginary numbers on the vertical axis. Riemann found that certain complex numbers, when plugged into the zeta function, produce the result zero.