Niven completed the solution of most of Waring's problem in 1944. This problem, based on a 1770 conjecture by Edward Waring, consists of finding the smallest number g ( n ) {\displaystyle g(n)} such that every positive integer is the sum of at most g ( n ) {\displaystyle g(n)} n {\displaystyle n} th powers of positive integers. David Hilbert had proved the existence of such a g ( n ) {\displaystyle g(n)} in 1909; Niven's work established the value of g ( n ) {\displaystyle g(n)} for all but finitely many values of n {\displaystyle n} .