The Puzzle Page is dedicated to bringing you the best puzzles collected from around the world along with original puzzles not seen anywhere else.

The staff at The Puzzle Page always enjoy seeing new puzzles and would love to hear from you. If you have a puzzle that's giving you problems, drop us a line -- we'd love to help.

Thursday, January 31, 2008

Three Squares in 2008

Here's another request from a reader:

"How can I write 2008 as the sum of three squares?"

There are four ways you can write 2008 as the sum of three squares, can you find all of them?


CT said...

To find all possible solutions, we can determine the largest squares from the ceilings after each term.

For example:
45^2 > 2008, we use 44^2 as the first term. 2008 - 44^2 = 72

9^2 > 72, we can use 8^2 as 2nd term, but the difference is not a square

look down until 72 - 6^2 = 36 = 6^2. Hence we have a way: 2008 = 44^2 + 6^2 + 6^2

Formula for searching should be:
2008 - x^2 - y^2 = z^2, where x^2 < 2008 and y^2 < (2008-x^2), x, y, z are positive natural numbers.

We can write a program to calculate this. There are 2 loops:
1. for(i=1;i^2<2008;i++)
2. for(j=1;j^2<(2008-i^2);j++)
And check whether (2008-i^2-j^2) is a square or not.

If there is no function to check that, we can use 3 loops to check that (2008-i^2-j^2-k^2)==0

PS: General program should have a user input of "2008" variable.

Math Genius 900 said...

I also used a computer program to go thru all possible answers and found all 4 solutions.
Also, as a side note, there are actually infinity different answers if you include imaginary numbers.
for example,

28^2 + 35^2 + i^2
784 + 1225 + -1
2009 - 1 = 2008

Anonymous said...

I found this site using [url=][/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

Anonymous said...

Order speman Discount adalat Order lynoral Discount amoxil Generic isosorbide mononitrate No prescription reglan

Anonymous said...

[b]Buy [url=]Generic Viagra[/url] Online - No Prior Prescription Required (Price from $1 per Tablet!)[/b]
We Accept All Major Credit Cards (Visa, Mastercard, Amex, JCB, Diners Club), EuroCard (Online Check for European Countries), ACH (USA Online Check), Western Union, Money Gram and Wire Transfer!
Buy Generic Viagra (Sildenafil Citrate 100mg) for Only $1 / pill - No Prescription Required - We add 20 gift Generic Viagra pills to every order for more than 100 pills of any Erectile Dysfunction drug.

Anonymous said...

[url=]Generic Viagra 100 mg[/url]

Devadatta S. Rajadhyaksha said...

Even without imaginary numbers, you can have many more answers. Just include negative numbers as well, as the squares will all be positive.

Unknown said...

thank for share great information

شركة تنظيف منازل بالاحساء said...

شركة اوائل المثالي
تسليك مجاري
خدمات تنظيف
رش دفان
رش مبيدات
عزل اسطح و خزانات
كشف تسربات
مكافحة حشرات