Important papers of his include On series expansions determined by the methods of least squares, and Investigations of the number of primes less than a given number. The mathematical method that bears his name, the Gram–Schmidt process, was first published in the former paper, in 1883.Gram's theorem and the Gramian matrix are also named after him.
For number theorists his main fame is the series for the Riemann zeta function (the leading function in Riemann's exact prime-counting function). Instead of using a series of logarithmic integrals, Gram's function uses logarithm powers and the zeta function of positive integers. It has recently been supplanted by a formula of Ramanujan that uses the Bernoulli numbers directly instead of the zeta function.
Gram was the first mathematician to provide a systematic theory of the development of skew frequency curves, showing that the normal symmetric Gaussian error curve was but one special case of a more general class of frequency curves.