We have seen that some positive integers can be written as the sum of two squares, but some cannot. Can all positive integers be written as the sum of three squares, or as the sum of four squares? How many squares would it take to express every integer? Maybe there is no fixed value

mso that every positive integer is a sum ofmsquares.First, we should clarify what we mean by writing a positive integer as the sum of say three squares. We allow using 0

^{2}, so we would say that 5 is the sum of three squares because 5 = 1^{2}+ 2^{2}+ 0^{2}.The next applet will help in our investigations. You get to supply a bound

B. The applet tries to write each integer from 1 toBas a sum of as few squares as possible. As it goes along, it prints out information saying how many it was not able to write as a sum of two squares, as a sum of three squares, and so on. Finally, it returns a list ofBintegers stating the minimum number of squares needed for expressing that integer. Here's what we get forB= 50:

The output tells us that some of the integers could not be written as a sum of three squares, but all of the integers from 1 to 50 could be written as a sum of four squares. In that final list of numbers, we can see a 3 in the sixth position. This means that 6 is the sum of three squares, but is not the sum of two squares.

Use the applet to try to answer the following question:

## Research Question 5

How many squares are needed to write every integer, or are there integers which need arbitrarily large numbers of squares?

(You should be able to formulate a conjecture here, but the proof of the "right" conjecture is very difficult. In fact, both Fermat and Euler knew the right conjecture, but neither was able to prove it!)

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

Copyright © 2001 by W. H. Freeman and Company