successive terms, all differences of the differences, and so forth. Since the th differences of the sequence are all equal to (Finite difference), the th differences would all be constant and equal to , which is certainly not divisible by . Therefore, cannot divide all the second factors which proves that is indeed the sum of two squares. Lagrange's proof through quadratic forms Lagrange completed a proof in 1775 based on his general theory of integral quadratic forms. The following presentation incorporates a slight simplification of his argument, due to Gauss, which appears in article 182 of the Disquisitiones Arithmeticae. An (integral binary) quadratic form is an expression of the form with integers. A number is said to be represented by the form if there exist integers such that . Fermat's theorem on sums of two squares is then equivalent to the statement that a prime is represented by the form (i.e., , ) exactly when is congruent to modulo . The discriminant of the quadratic form is defined to be . The discriminant of is then equal to . Two forms and are equivalent if and only if there exist substitutions with integer coefficients with such that, when substituted into the first form, yield the second. Equivalent forms are readily seen to have the same discriminant, and hence also the same parity for the middle coefficient , which coincides with the parity of the discriminant. Moreover, it is clear that equivalent forms will represent exactly the same integers, because these kind of substitutions can be reversed by substitutions of the same kind. Lagrange proved that all positive definite forms of discriminant −4 are equivalent. Thus, to prove Fermat's theorem it is enough to find any positive definite form of discriminant −4 that represents . For example, one can use a form where the first coefficient a = was chosen so that the form represents by setting x = 1, and y = 0, the coefficient b = 2m is an arbitrary even number (as it must be, to get an even discriminant), and finally is chosen so that the discriminant is equal to −4, which guarantees that the form is indeed equivalent to . Of course, the coefficient must be an integer, so the problem is reduced to finding some integer m such that divides : or in other words, a 'square root of -1 modulo ' . We