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?
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.
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
Subscribe to:
Post Comments (Atom)
5 comments:
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.
I also used a computer program to go thru all possible answers and found all 4 solutions.
6,6,44
6,26,36
10,12,42
18,28,30
Also, as a side note, there are actually infinity different answers if you include imaginary numbers.
for example,
28,35,i
because
28^2 + 35^2 + i^2
784 + 1225 + -1
2009 - 1 = 2008
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!
Order speman Discount adalat Order lynoral Discount amoxil Generic isosorbide mononitrate No prescription reglan
Even without imaginary numbers, you can have many more answers. Just include negative numbers as well, as the squares will all be positive.
Post a Comment