The different ways of expressing whole numbers as sums of parts has long fascinated both professional and amateur mathematicians.
Consider, for example, the sequence of squares of whole numbers: 1, 4, 9, 16, 25, 36, and so forth. As the sequence progresses, the gaps between consecutive squares get longer and longer. Clearly, most integers are not squares of whole numbers.
Many integers can be written as the sum of two squares: 8 = 4 + 4; 10 = 9 + 1; 13 = 9 + 4; and so on. Other numbers can’t be expressed as the sum of just two squares. To get a sum that equals 6, the only squares available are 4 and 1, and these won’t do the job. Instead, it takes the sum of three squares: 6 = 4 + 1 + 1.