math ee

Click here to load reader

Upload: udit-mehrotra

Post on 13-Apr-2017

119 views

Category:

Documents


2 download

TRANSCRIPT

Expressing Natural Numbers as the Sum of Two Perfect Squares

Udit Mehrotra 6.10

002329-239

Mathematics Extended Essay: Expressing Natural Numbers as the Sum of Two Perfect Squares

Name: Udit Mehrotra Class: 6.10 Word Count: 3547Expressing natural numbers as the sum of two perfect squares.Abstract

This essay answers the question of which natural numbers can be expressed as the sum of two perfect squares by developing proofs that lead to this answer. The problem is approached using the Gaussian integers, a subset of the complex numbers where the real and imaginary parts are integers by factoring a+b into the product of two Gaussian integers, (a+bi)(a-bi). From this perspective, the question arises as to what are the prime Gaussian integers since every number that can be expressed as the sum of two squares is a composite Gaussian integer as shown above. Analysis of the parity of a number was used to show that all numbers congruent to 3 with respect to modulus 4 are not the sum of two squares. Furthermore, the multiplicative property of norms of the Gaussian integers proved closure under multiplication in the set of all numbers that are the sum of two squares. The quadratic character of 1 in a modulus p where p is a prime congruent to 1 with respect to modulus 4 and the fundamental theorem of arithmetic allowed us to prove that all such p can be expressed as the sum of two squares. It was shown that all prime Gaussian integers other than 2 are integers congruent to 3 with respect to modulus 4. Finally, we proved that n is the sum of two perfect squares if and only if all prime factors of n congruent to 3 in modulus 4 are raised to an even power in the prime factorization of n. (256 words)Introduction

Number theory is the mathematical study of the natural numbers or counting numbers, N = {1, 2, 3, 4, 5 ...} and their properties. Number theory is one of the oldest and most natural branches of mathematics. Scholars have pondered over properties of the natural numbers such as those of the series of primes for thousands of years. Nonetheless, number theory is very much alive and evolving. Interestingly there are hundreds of unanswered questions in the field of number theory and computers rely heavily on the study of the natural numbers. Often in number theory seemingly simple problems that are easy to state and understand are extremely difficult to solve and prove.

The problem of what numbers can be expressed as the sum of two squares has a lengthy history. Diophantus of Alexandria, a famous Greek mathematician of antiquity, originally posed the problem around the third century A.D. in Arithmetic. Additionally, Diophantine equations, equations with at least two variables where solutions must be integral values, are named after Diophantus. The equations themselves can often be solved with elementary algebra for one variable in terms of another, however these equations become extremely complex when only integral solutions are desired. If a number, n, can be expressed as the sum of two squares, then there exists a solution to the Diophantine equation n = a+b.

Dutch mathematician Albert Girard first discovered which numbers are the sums of two squares in 1625. Pierre de Fermat also solved the problem shortly after. Fermat is infamous for not writing down proofs and it is very well possible that Fermat even had proofs confirming his findings. However, Euler gave the first proof of which numbers can be represented as the sum of two squares in 1749. Eulers classical proof essentially uses number theoretic approaches and is rather complex.

Carl Friedrich Gauss contributed great accomplishments to number theory in the early 1800s and knew that a number theory proofs simpler methods may long remain concealed prior to a solution. Likewise, a much simpler proof than Eulers emerges when the sum of two squares problem is approached using the Gaussian integers denoted by Z[i]. The Gaussian integers are a subset of the complex numbers where the real and imaginary parts are integers. The Gaussian integers serve as another way of viewing the properties of numbers that are the sum of two squares. We will use the properties of the Gaussian integers in order to show that all of the numbers that can be expressed as the sum of two squares have all of their prime factors of the form 4k+3 raised to an even power and that these are all the numbers that are the sum of two squares.

Stated clearly, the problem to be investigated is for what natural numbers, n, do there exist integral solutions - a and b such that n = a+b. All such integers n compose a set, which we shall denote as S. It is obvious that all perfect squares are naturally elements of S since by allowing a and b to be integers and not merely natural numbers, a or b could be zero and the other variable could be the square root of the number. A Gaussian integer is basically a complex number whose real and imaginary parts are both integers. A Gaussian integer a + bi is prime if and only if one of a or b is zero and the other is a prime of the form 4n + 3 or both are nonzero and a2 + b2 is prime, for example: (2+3i)(2-3i)

22 + 32 = 13. 13 here is a real prime number.

The connection between elements of S and the Gaussian integers arises from the fact that the product of a Gaussian and its conjugate is the sum of two perfect squares: (a+bi)(a-bi) = a+b, where i = -1. The product of a Gaussian integer, n (a+bi), and its conjugate (a-bi) is called the norm denoted by N (n). Therefore, all numbers that can be expressed as the sum of two squares can be factored in the Gaussian integers and are composite Gaussian integers. On the other hand, this statement shows that all prime numbers in the Gaussian integers cannot be expressed as the sum of two squares. For example: 4(1) +3=a2+b2 Hence, we can see that there can be no real value for a and b in this equation. The converse, all composite numbers in the Gaussian integers can be expressed as the sum of two squares, is obviously false. For example:

21=a2+b2 21 is obviously a composite number in the natural numbers and the Gaussian integers but there are no two integers that their squares add up to 21. A composite number refers to a positive integer which has a positive divisor other than one or itself. For example, in this case it can be 3 or 7.There are four units in the Gaussian integers, 1, -1, i, and i, since all can be raised to a power in order to equal 1. Primes in the natural numbers are not necessarily primes in the Gaussian integers. For example:

5 = (2+i) (2-i). Finding what numbers are prime in the Gaussian integers shall play an important part in discovering what numbers are the sum of two squares.

We shall start by presenting a simple property of perfect squares using modulus, one of the most fundamental ideas in number theory. We say that a number is congruent to another number in modulus m if the difference of the numbers is a multiple of m. This is equivalent to saying that the two numbers have the same remainder when divided by m. We use the following notation developed by Gauss to express congruencies: a b (mod m). Since all numbers are either even or odd, all perfect squares are of an interesting form when examined in mod four. Hence, to proceed with expressing natural numbers as the sum of two perfect squares, it would be important to look at different theorems. For these theorems, knowledge of various theorems such as Fermats and Eulers have been used and explained logically as to why they are so and how they came to be.Methodology

Theorem 1: If n is even, then n 0 (mod 4).

Proof: The fact that n is even allows us to introduce an integer r such that n = 2r. Squaring this equation results in n = 4r. Since the right side of the equation is a multiple of four we can conclude that n 0 (mod 4) as desired.

Theorem 2: If n is odd, then n 1 (mod 4).

Proof: Since n is odd we know it is 1 greater than some even number. Therefore, there exists an integer s such that n = 2s+1. Once again we square the equation and obtain

1) n = (2s+1) This simplifies to 2) n = 4s+4s+1. We can now factor the 4 out of the two terms on the right: 3) n = 4(s+s) +1. Looking at this equation in (mod 4), as shown, we finally arrive at n 1 (mod 4). We can extend the above congruence to hold true in modulus 8 by further factoring 1) n = 4(s+s) +1 Into 2) n = 4s(s+1) +1. Since s is an integer, s must be even or odd and in turn s or s+1 must be even. Factoring the two out of the even expression yields 3) n = 8t+1 for an integer t. It has now successfully been shown that if n is even, n 1 (mod 8).

By expanding the numbers based on their parity and then squaring, we have found all of the perfect squares or quadratic residues in mod 4. With this fundamental knowledge, we are now able to consider what the sum of two perfect squares will be in modulus 4. The two numbers to be squared and then added, a and b, must each either be odd or even. We shall now consider each pairing of odd and even in order to exhaustively prove that any number congruent to 3 with respect to modulus 4 cannot be the sum of two squares. This theorem can be closely related to Fermats Little Theorem.

Theorem 3: If n 3 (mod 4), then n S.

Proof: There are four cases for the parities of a and b. For the first case suppose a and b are both odd. Then, 1) a+b 1+1 2 (mod 4)Or

2) a+b 49+35 2(mod 4).

Now taking a and b to be even for the second case. The sum of their squares becomes:

1) a+b 0+0 0 (mod 4) Or

2) a+b 64+16 0 (mod 4)

Finally, the third and fourth cases have one variable odd and the other even, 1) a+b 1+0 1 (mod 4) Or

2) a+b 36+35 1 (mod 4) Since a and b must be either odd or even, we have exhaustively proven that any number n such that n 3 (mod 4) cannot be expressed as the sum of two squares.

Based on a numbers congruence class in modulus 4 we can also determine the parity of any two numbers such that the sum of their squares is the original number. For example, the number 10 is congruent to 2 with respect to modulus 4 (10 2 (mod 4) therefore a and b must both be odd. This is true as 10 = 3+1. This is based on the assumption that the number is a part of S. So in this case, 10 is definitely part of the group S.We will now show that S is closed under multiplication, which means the product of any two numbers that can be expressed as the sum of two squares also is the sum of two squares. One example is

(18x13), 18 = 3+3 and 13 = 3+2. This is proven by:

234 = 3+15. Leonardo of Pisa, who is also known as Fibonacci, is given credit for the identity utilized in the following proof since it appeared in his Liber Abaci in 1202.

Theorem 4: If x and y are elements of S, then (x) (y) is an element of S.

Proof: Since x and y are elements of S, by the definition of S we can write 1) x = c+dAnd

2) y = e+f for integers c, d, e, and f. We can now write the product of (x) (y) as: 3) (x) (y) = (c+d) (e+f). Expanding results in:

4) (x) (y) = c2e2+c2f2+d2e2+d2f2. The commutative property of addition allows us to rewrite this to obtain

5) (x) (y) = c2e2+d2f2+c2f2+d2e2. We now add a convenient form of 0: 6) (x) (y) = c2e2+2cdef+d2f2+c2f2-2cdef+d2e2. Factoring results in 7) (x) (y) = (ce+df)2+(cf-de)2. Since ce+df and cf-de are integers (x) (y) is expressible as the sum of two squares as shown. Interestingly, in the previous proof if 2cdef and -2cdef had been reversed, (x) (y) could have been factored differently: (x) (y) = (ce-df)2+(cf+de)2. The previous proof is not one of existence but specifically states which numbers can be squared so that their sum is (x) (y). For example, let 1) x = 13 and y = 5. Consequently, 2) c = 3, d = 2, e = 2, f = 1. Applying the above proof shows 3) 65 = 8+1. The alternative identity previously stated yields 4) 65 = 4+7.

The above proof is the multiplicative property of norms in the Gaussian integers, N (xy) = N(x) N(y), since the norm of a Gaussian integer is the sum of two squares. Due to the fact that the absolute value of a Gaussian integer is the square root of its norm, this property is closely related to the multiplicative property of absolute values,(x((y( = (xy(.

Now we are naturally led to the question of which primes can be expressed as the sum of two squares. Since all primes excluding 2 are congruent to 1 or 3 with respect to modulus 4, and we have shown that all numbers congruent to 3 cannot be the sum of two squares, we examine whether primes of the form 4k+1 are elements of S. Although Euler developed the classical proof of this theorem, Fermat may have known a proof prior. In a letter to fellow mathematician Huygens, Fermat hinted that he knew a proof using a method of infinite decent but characteristically did not disclose it. However, a more elegant proof involving the Gaussian integers shall be presented.

Theorem 5: If p is a prime in the natural numbers and p 1 (mod 4), then p S.

Proof: A number is said to be a quadratic residue of a modulus if it is congruent to the square of another number. It has been proven that since p is a prime congruent to 1 in modulus 4, -1 is a quadratic residue in modulus p; however, the proof is beyond the scope of this text. Since -1 is a quadratic residue in modulus p, there exists an n such that n -1 (mod p) by the definition of a quadratic residue. Adding one to both sides of the congruence results in: 1) n+1 0 (mod p). The definition of modulus allows us to state that there exists some integer k such that 2) (p) (k) = n+1. Therefore, p evenly divides n+1, 3) p ((n+1). We can factor this in the Gaussian integers,4) p ((n+i) (n-i). Now supposing p is a prime in the Gaussian integers. We can apply a form of the fundamental theorem of arithmetic called Euclids first theorem, which states that if a number is a prime and divides the product of two numbers, it divides one of the numbers. This theorem allows us to say that 5) p ((n+i) or p ((n-i).We can rewrite the statements of divisibility by using the definition of divisibility in the Gaussian integers, which states there exists a Gaussian integer, a+bi, such that 6) (p) (a+bi) = ni. Multiplying p yields 7) pa+(pb)i = ni. For two Gaussian integers or complex numbers to be equal, their real and imaginary parts must be equal. Equating the imaginary coefficients results in 8) (p) (b) = 1. It is impossible for a prime number to divide 1 in this manner and we have arrived at a contradiction. Therefore, our supposition is false and p is not a prime. Since p is a prime in the natural numbers, it cannot be a unit in Z[i] and is a composite Gaussian integer. By the definition of a composite number there exist Gaussian integers x and y that are not units and p = xy. We will now take the norm of both sides since both are Gaussian integers 9) N (p) = N (xy). Using the multiplicative property of norms proven in theorem 4 permits us to assert that 10) N (p) = N(x) N(y). Since p is a natural number and has no imaginary part, N (p) = p. Applying the transitive property of equality gives: 11) p = N(x)N(y). The norm function results in a natural number greater than 1 for all non-zero Gaussian integers that are not units. Since p is a prime in the natural numbers, the only two possible ways to factor p is

12) p = (p)1 or p = p*p

But knowing that N(x) and N(y) are greater than 1 proves that N(x) = N(y) = p. We now have shown that p is equal to a Gaussian integers norm. Since all norms are defined to be the sum of two squares, p must also be the sum of two squares, which was to be proven.

The previous proof uses quadratic residues, factoring into Gaussian integers, and the fundamental theorem of arithmetic in order to show that all primes of the form 4k+1 are composite Gaussian integers. This was combined with the multiplicative property of norms to finally prove that all such primes can be expressed as the sum of two squares.

Thus far, we have shown that all primes congruent to 3 in modulus 4 cannot be the sum of two squares while all primes congruent to 1 in modulus 4 are elements of S. Although we also know that S is closed under multiplication, we do not know that the product of two numbers that are not elements of S is not itself an element of S. In fact, the product could be an element of S or not depending on the numbers as illustrated by the following example. 3 and 7 are not the sum of two squares and their product, 21, also is not a sum of two squares. However, the product of 3 and 6 is an element of S because 3+3 = 18. The following theorem will illustrate that the product of 3 and 6 is an element of S while the product of 3 and 7 isnt.

Theorem 6: If n is an element of S, b(n, and b is a prime congruent to 3 in modulus 4, then b(n.

Proof: Since n is an element of S, there exist integers c and d such that 1) n = c+d. Once again we factor in the Gaussian integers, 2) n = (c+di)(c-di). Knowing that b divides n, b must also divide (c+di)(c-di). It has been shown that b being congruent to 3 in modulus 4 prevents b from being the sum of two squares. The only way for a product of two non-unit Gaussian integers to equal a prime natural number is if the Gaussian integers are conjugates, which implies the prime is the sum of two squares. However, by Theorem 3, b is not the sum of two squares and therefore must be a prime Gaussian integer. In the same manner as above, we would apply the fundamental theorem of arithmetic and b((c+di) or b((c-di). Since we have a natural number dividing a Gaussian integer, b must divide the coefficients of the real and imaginary parts, b(c and b(d. The definition of divisibility allows us to introduce integers k and j such that 3) bk = c and bj = d. We can now substitute these values for c and d into our original equation, 4) n = (bk)+(bj). Factoring b out leaves: 5) n = b(k+j). By the definition of divisibility, b(n as desired.

In the previous two proofs, we have determined which numbers are primes in the Gaussian integers. All primes congruent to 3 in modulus 4 must be prime Gaussian integers because they cannot be expressed as the sum of two squares. On the other hand, all primes congruent to 1 in modulus 4 are the sum of two squares and, therefore, can be factored in Z[i] and are composite Gaussian integers. In fact, all prime Gaussian integers other than 2 are integers congruent to 3 with respect to mod 4.

We now have all of the tools necessary to create a theorem stating exactly what natural numbers can be expressed as the sum of two squares, which in turn utilizes all of our previous work.

Theorem 7: n is an element of S if and only if all prime factors of n congruent to 3 in modulus 4 are raised to an even power in the prime factorization of n.

Proof: There are two steps to this proof: first proving that all such numbers n are elements of S and second proving that all elements of S are of this form. We plan to show that divisors of n are elements of S and then use the multiplicative closure of S proven in Theorem 4 for the first half of the proof. All primes in the natural numbers are either congruent to 1 or 3 with respect to modulus 4 except 2. Two is clearly proven to be an element of S since 1+1 = 2. In Theorem 5, it was proven that all primes congruent to 1 in modulus 4 are also elements of S. Finally, any prime, p, congruent to 3 in modulus 4 when raised to an even power must be an element of S since 1) p2k = (pk)2+02. By Theorem 4 we can conclude that all powers and products of the numbers we have shown to be elements of S are themselves elements of S. Thus, the first part of the proof is complete.

Theorem 6 builds the foundation for proving that all elements of S must have even powers of all primes, p, congruent to 3 in modulus 4. Direct application of theorem 6 allows us to prove that for all elements of S, p cannot be raised to the first power, since one factor of p implies n has at least two factors. We will now attempt to apply Theorem 6 again to rule out the possibility of such primes being raised to any odd powers. If such a prime, p, is raised to an odd power 2m+1, will be a new integer that is an element of S and is divisible by p. Therefore, we can apply Theorem 6 again to show that as long as n is an element of S; all p cannot be raised to an odd power. The theorem is finally proven. Davenport, Higher Arithmetic

Davenport, Higher Arithmetic

Euler Webpage

Gauss Quotes Webpage

Davenport, Higher Arithmetic

Davenport, Higher Arithmetic 116

Fermat Webpage

Theorem 82. Hardy and Wright.

Conclusion

From my above theorems, we can conclude that a real number can be expressed as the sum of two squares if and only if all prime factors congruent to 3 in modulus 4 are raised to an even power in the numbers prime factorization. The essay has developed a chain of reasoning that leads up to this proof and is closely tied with the properties of the Gaussian integers, because a+b can be factored into Gaussian integers as (a+bi)(a-bi).

Thus, the problems of finding which numbers are the sums of two squares transformed into finding what numbers are primes in the Gaussian integers. The properties of perfect squares in modulus 4 were used advantageously to prove that all numbers congruent to 3 in modulus 4 cannot be the sum of two squares. Additionally, an algebraic identity proves that the product of any two numbers that can be expressed as the sum of two squares is itself the sum of two squares. This corresponds directly to the multiplicative property of norms of Gaussian integers. The quadratic character of -1 as well as the fundamental theorem of arithmetic were used in order to show that all primes congruent to 1 in modulus 4 can be expressed as the sum of two squares. Next, it was shown that since primes congruent to 3 in modulus 4 are not the sum of two squares, they are prime numbers in the Gaussian integers. Finally, the essay culminated in the proof of what numbers can be expressed as the sum of two perfect squares where all of the previous proofs played an integral part.

Although we now know which numbers are the sums of two squares, a formula for the number of ways such a number can be represented as the sum of two squares and efficient algorithms for finding such numbers have yet to be considered.

Acknowledgements

I would like to thank my teacher-mentor Mr. Sunil Dutt for his continuous guidance and support and for pushing me in my Mathematics Extended Essay

Bibliography

Adapted, Pg. 7.. The Higher Arithmetic Davenport, H. Cambridge: Cambridge University Press, page 7; 1999.

Adapted Pg. 115 .. The Higher Arithmetic. Davenport, H Cambridge: Cambridge University Press, page 115; 1999.

Adapted Pg. 115 The Higher Arithmetic. Davenport H: Cambridge University Press, OConnor, John, and Robertson, Edmund. Leonhard Euler: MacTutor History of Mathematics Archive.

http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Euler.html, December 2, 2001.

Cung, Nelly. Quotes of Carl Friedrich Gauss.

http://www.geocities.com/RainForest/Vines/2977/gauss/quotes.html, November 10, 2001.

Adapted Pg. 41 The Higher Arithmetic. Davenport H. Cambridge: Cambridge.

Adapted Pg. 116 The Higher Arithmetic. Davenport H. Cambridge: Cambridge.

OConnor, John, and Robertson, Edmund. Pierre de Fermat: MacTutor History of Mathematics Archive. http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Fermat.html, December 2, 2001.

Adapted Pg. 169An Introduction to the Theory of Numbers Hardy, G. H., and Wright E. M.. . New

Bibliography

Cung, Nelly. Carl Friedrich Gauss. http://www.geocities.com/RainForest/Vines/2977/gauss/gauss.html, November 10, 2001.

The Higher Arithmetic Davenport, H.. . Cambridge: Cambridge University Press, 1999.

An Introduction to the Theory of Numbers Hardy, G. H., and Wright E. M.. . New York: Oxford University, 1979.

OConnor, John, and Robertson, Edmund. MacTutor History of Mathematics Archive. http://www-groups.dcs.st-and.ac.uk/~history/, December 2, 2001.

Contents Page

Cover Page 1

Abstract 2

Introduction 3-5

Essay

Theorem 1 6

Theorem 2 6-7

Theorem 3 7-8

Theorem 4 8-10

Theorem 5 10-12

Theorem 6 12-13

Theorem 7 13-14

Conclusion 16

Acknowledgements 17

Bibliography 18-19

PAGE 1

_1059702516.unknown

_1059788629.unknown

_1059674727.unknown