12.5   Sums of Many Squares

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 m so that every positive integer is a sum of m squares.

First, we should clarify what we mean by writing a positive integer as the sum of say three squares. We allow using 02, so we would say that 5 is the sum of three squares because 5 = 12 + 22 + 02.

The next applet will help in our investigations. You get to supply a bound B. The applet tries to write each integer from 1 to B as 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 of B integers stating the minimum number of squares needed for expressing that integer. Here's what we get for B = 50:

Your browser does not support java.

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

Chapter 12 | DNT Table of Contents

Copyright © 2001 by W. H. Freeman and Company