Math Fun Facts!
hosted by the Harvey Mudd College Math Department created, authored and ©1999-2010 by Francis Su
Subscribe to our RSS feed   or follow us on Twitter.
Get a random Fun Fact!
No subject limitations
Search only in selected subjects
    Calculus or Analysis
    Number Theory
    Other subjects
  Select Difficulty  
Enter keywords 

  The Math Fun Facts App!
  List All : List Recent : List Popular
  About Math Fun Facts / How to Use
  Contributors / Fun Facts Home
© 1999-2010 by Francis Edward Su
All rights reserved.

From the Fun Fact files, here is a Fun Fact at the Medium level:

Sums of Three and Four Squares

How many squares does it take to express every whole number as the sum of squares? We saw that two was not enough in Sums of Two Squares. Perhaps three? Or four?

Well, three is not enough, but almost. The only whole numbers which cannot be written as the sum of 3 squares are numbers of the form 4m(8k+7). So you will have problems writing 7, 15, or 28 as the sum of three squares.

But every whole number can be written as the sum of four squares!

Accordingly, 7=22+12+12+12, and 15=32+22+12+12.

Presentation Suggestions:
Have the class pick their favorite number and write it as the sum of four squares.

The Math Behind the Fact:
The sum of 4 squares result was stated by Gerard, Fermat, and Diophantus(?), but first proved by Lagrange in 1770. It is a classic result in number theory.

How to Cite this Page:
Su, Francis E., et al. "Sums of Three and Four Squares." Math Fun Facts. <>.

Keywords:    sums of squares, number theory
Subjects:    number theory
Level:    Medium
Fun Fact suggested by:   Lesley Ward
Suggestions? Use this form.
Click to rate this Fun Fact...
    *   Awesome! I totally dig it!
    *   Fun enough to tell a friend!
    *   Mildly interesting
    *   Not really noteworthy
and see the most popular Facts!
New: get the MathFeed iPhone App!

Brings you news and views on math:
showcasing its power, beauty, and humanity

Want another Math Fun Fact?

For more fun, tour the Mathematics Department at Harvey Mudd College!