 In doing so, he discovered a connection between Riemann zeta function and prime numbers, known as the Euler product formula for the Riemann zeta function.Euler proved Newton's identities, Fermat's little theorem, Fermat's theorem on sums of two squares, and made distinct contributions to the Lagrange's four-square theorem.He also invented the totient function φ(n) which assigns to a positive integer n the number of positive integers less than n and coprime to n. Using properties of this function he was able to generalize Fermat's little theorem to what would become known as Euler's theorem.