Selberg was born in Langesund , Norway. While he was still at school he was influenced by the work of Srinivasa Aaiyangar Ramanujan. During the second world war he worked in isolation due to the occupation of Norway by the Nazis. After the war his accomplishments in the theory of the Riemann zeta function became known. The celebrated Riemann hypothesis states that all zeros of the complex Riemann zeta function (except the "trivial" zeros at the negative even integers) lie on the line 1/2 + it, t real. This has never been proved. However, G. H. Hardy proved that an infinite number of zeros do exist on this line. Selberg proved that a positive proportion lie on this line. This is a famous theorem.
Selberg came to the United States and settled at the Institute for Advanced Study in the 1950s where he remains today. During the 1950s he developed the Selberg trace formula, his most famous accomplishment. It establishes a duality between the length spectrum of a Riemann surface and the eigenvalues of the Laplacian which is analogous to the duality between the prime numbers and the zeros of the zeta function.
Selberg and Erdös gave elementary proofs of the prime number theorem, although it was prior believed that such proofs with only real variables can't be found. Their investigations were not fully independent though they did not write a joint paper.