# Challenge of the Week

• Feb 5th 2009, 11:35 PM
Challenge of the Week
Hi all, not really sure if this is in the right forum but I would like your input on this challenge of the week. It is labeled as very challenging and looks a little over my head.

"Two distinct positive integers are chosen. The square of the smaller integer is computed. The larger integer is replaced with the absolute difference of the two original integers. The process continues with the absolute value and the smaller integer. From these, the square of the smaller integer is computed and the larger integer is replaced with the absolute value of the difference. This process is continued until the difference is zero. What is the sum of the squares that have been computed? Justify your answer."

Again if it's in the wrong forum let me know but your help would be greatly appreciated.
• Feb 6th 2009, 11:52 PM
Opalg
If the chosen integers are a and b, then the sum of the squares will be ab.

This is almost obvious if you think about the problem geometrically. Start with a rectangle whose sides have lengths a and b, with a<b say. Chop off a square of side a from one end of this rectangle, leaving a smaller rectangle (with sides a and b–a). Chop off a square from one end of this rectangle, and continue this process until the whole original rectangle has been chopped up into squares. Clearly the sum of the areas of these squares will be the same as the area of the original rectangle.

$\setlength{\unitlength}{5mm}
\begin{picture}(8,12)
\put(7,0){\line(0,1){7}}
\put(7,4){\line(1,0){4}}
\put(10,4){\line(0,1){3}}
\put(10,5){\line(1,0){1}}
\put(10,6){\line(1,0){1}}
\thicklines
\put(0,0){\line(1,0){11}}
\put(0,0){\line(0,1){7}}
\put(0,7){\line(1,0){11}}
\put(11,0){\line(0,1){7}}
\end{picture}$

The diagram illustrates this process with a = 7 and b = 11.
• Feb 7th 2009, 01:36 AM
running-gag
Well done ! (Clapping)