Selberg was born in Lagesund, Norway. His interest in mathematics was kindled at the age of 17, when he came across the collected works of the enigmatic Indian mathematician Srinivasa Ramanujan. In the same year, he wrote his first paper, On Some Arithmetical Identities. He went on to study at Oslo University, and gained his doctorate in 1943. He remained there throughout the second world war, working in isolation during the German occupation.
During this period, he produced many of his key papers on the Riemann Zeta function. The most famous question in this area, still unanswered, is the Riemann Hypothesis. One of Selberg's best known contributions shows that the hypothesis is indeed true in a positive proportion of all cases (more precisely, that a positive proportion of the non-trivial zeros of the Riemann Zeta function are on the critical line).
In 1947 Selberg married Hedvig Liebermann, and moved to the US, where he spent his first year at the Institute of Advanced Study at Princeton, New Jersey, arguably the world's leading research institute for mathematics, and then home to Albert Einstein. It was around this time he developed the "Selberg Sieve" to handle questions about prime numbers.
The sieve of Eratosthenes is the classical tool for finding prime numbers, but it is poorly suited to solving problems about them. The Selberg sieve, on the other hand, can give information about the number of primes of certain types. While the origins of this development can be back to Selberg's earlier work on the Riemann Zeta function, it is far more down to earth. In its purest form it reduces to a remarkably simple and elegant idea, which continues to have many important applications in prime number theory.
The following year, 1948, saw Selberg's "elementary" proof of the prime number theorem. This tells us, to within a good degree of approximation, how many prime numbers there will be up to any large limit.
The original proof was one of the greatest triumphs of 19th-century mathematics and required the use not only of integration and differentiation but of complex numbers. It seemed unnatural to many researchers that such difficult tools should be necessary for such an apparently simple problem, but repeated attempts had failed to find a satisfactory alternative argument.
The situation has always been shrouded in controversy. Selberg's argument was based on an intermediate result, about which he had lectured. On hearing the lecture, the Hungarian mathematician Paul Erdos had deduced his own elementary proof of the prime number theorem, and the resulting priority dispute is still a topic of discussion. Perhaps this is unsurprising, given that it was largely this work for which Selberg's Fields medal was awarded. In 1949, after a year as associate professor at Syracuse University in New York state, Selberg became a permanent member of the Institute for Advanced Study, where he remained until his death. During the 1950s, his attention turned to the application of spectral theory to automorphic forms.
In 1956, in a paper for the Journal of the Indian Mathematical Society, Selberg established what has come to be known as the Selberg trace formula, described as one of the most influential papers of the 20th century. Selberg's published little in his later years, but continued his research, and to lecture, into his 80s. He was rumoured to have a collection of unpublished work. He was held in awe by those who worked in his area, and perhaps seemed a little aloof.
Selberg's distinctions included the Wolf prize in mathematics (1986), and the Abel bicentennial anniversary prize (2002); he was an honorary member of the London Mathematical Society; he was elected to the national academies of Norway, Sweden, Denmark, the US and India; and in 1987 he became a knight commander with star of the Royal Order of Saint Olaf. He is survived by his second wife, Betty, and by his two children and two stepchildren.
· Atle Selberg, mathematician, born June 14 1917; died August 6 2007