The idea here is just like the previous section, but for the sum of two squares. In other words, we want to find integer solutions to the equation

n=x^{2}+y^{2}.This time we will state the research questions and then give some useful applets. We will only ask the question: how many ways can an integer

nbe written as the sum of two squares for prime values ofn?

## Research Question 2

Which primes

pcan be written as the sum of two squares, and in how many ways can it be done?

Note:This is a case where you will only be able to prove part of your conjecture. The complete proof of an optimal conjecture is beyond the scope of the chapter summary.

## Research Question 3

Which positive integers

ncan be written as the sum of two squares?

Hint:It is probably a good idea to use the standard progression for investigating problems which we have used earlier in the course. Research Question 2 takes care of the case whennis prime. Try products of distinct primes and prime powers before trying to jump to the complete conjecture. Also keep in mind that your answer here needs to be consistent with your conjecture for Research Question 2.We start with an applet analogous to the one in the previous section. It will compute all values of

x^{2}+y^{2}withxandynonnegative and ranging up to some bound. This time, switching the values ofxandyleavesx^{2}+y^{2}unchanged, so we takexy. Here is a sample.

For the problem of sums of squares, if we have a fixed value of

nand we want to determine ifn=x^{2}+y^{2}for somexandy, there are clearly only finitely manyxandywe have to try. In fact, if we takexy, then we can be sure thatx(n/2)^{1/2}. The next applet takes a single value ofnas input and uses this observation to find all ways of writingnas a sum of two squaresxandywithxy. For example, the output from the first applet indicated that 29 could be written as the sum of two squares. Here are the values ofxandywithxythat do it:

Thus we see that 29 = 2

^{2}+ 5^{2}, and thatx= 2 andy= 5 provide the only solution (withxy) to the equationx^{2}+y^{2}= 29.On the other hand, 50 can be written as a sum of two squares in two different ways:

So, 50 = 1

^{2}+ 7^{2}= 5^{2}+ 5^{2}. From the output of the first applet, it appeared that 15 was not the sum of two squares. We can verify this below:

Section 12.1 | Section 12.2 | Section 12.3 | Section 12.4 | Section 12.5

Copyright © 2001 by W. H. Freeman and Company