document.write( "Question 257441: The sum of 22^2 and 19^2 equals the sum of the squares of another pair of two digit, positive, whole numbers. Determine the numbers. \n" ); document.write( "
Algebra.Com's Answer #189358 by jsmallt9(3758)\"\" \"About 
You can put this solution on YOUR website!
We could just use trial and error and try to solve this by brute force. But it will make things easier if we understand that when multiplying or when adding, only the ones digits determine the ones digit of the answer. (Think about multiplying and adding and the truth of this should become clear.) We can use this to reduce the possible numbers to try.

\n" ); document.write( "\"22%5E2+%2B+19%5E2+=+484+%2B+361+=+845\"
\n" ); document.write( "So we are looking for two perfect squares that add up to 845. More specifically we are looking for two perfect squares that add up to 845 and whose ones digits add up to a number ending in 5.

\n" ); document.write( "Let's look at the first ten perfect squares:
\n" ); document.write( "0*0 = 0
\n" ); document.write( "1*1 = 1
\n" ); document.write( "2*2 = 4
\n" ); document.write( "3*3 = 9
\n" ); document.write( "4*4 = 16
\n" ); document.write( "5*5 = 25
\n" ); document.write( "6*6 = 36
\n" ); document.write( "7*7 = 49
\n" ); document.write( "8*8 = 64
\n" ); document.write( "9*9 = 81
\n" ); document.write( "The ones digits of these are: 0, 1, 4, 5, 6, 9. Since the ones digits of any number must be one of these first ten numbers, 0 through 9, and since the ones digits of the numbers in a multiplication solely determine the ones digit of the product, the ones digit of the square of any whole number must be 0, 1, 4, 5, 6 or 9.

\n" ); document.write( "Before we continue, I'll list the perfect squares that we might use (in addition to the above:
\n" ); document.write( "10*10 = 100
\n" ); document.write( "11*11 = 121
\n" ); document.write( "12*12 = 144
\n" ); document.write( "13*13 = 169
\n" ); document.write( "14*14 = 196
\n" ); document.write( "15*15 = 225
\n" ); document.write( "16*16 = 256
\n" ); document.write( "17*17 = 289
\n" ); document.write( "18*18 = 324
\n" ); document.write( "19*19 = 361
\n" ); document.write( "20*20 = 400
\n" ); document.write( "21*21 = 441
\n" ); document.write( "22*22 = 484
\n" ); document.write( "23*23 = 529
\n" ); document.write( "24*24 = 576
\n" ); document.write( "25*25 = 625
\n" ); document.write( "26*26 = 676
\n" ); document.write( "27*27 = 729
\n" ); document.write( "28*28 = 784
\n" ); document.write( "29*29 = 841

\n" ); document.write( "Since we want the ones digit of the sum to be a 5 we are looking for pairs of numbers from 0, 1, 4, 5, 6 or 9 that add up to a number that ends in 5. After some thought we should find that our perfect squares must end in one of the following pairs:
  • 0 and 5. This tells us that the first number squared ends in 0 and the second number being squared ends in 5. The first perfect square could be 0*0, 10*10 or 20*20. The second perfect square could be 5*5, 15*15 or 25*25.
  • 1 and 4. This tells us that the first number being squared ends in 1 or 9 and that the second number being squared ends in 2 or 8. So the first perfect square could be 1*1, 9*9, 11*11, 19*19, 21*21 or 29*29. The second number squared, since it ends in 4 could be 2*2, 8*8, 12*12, 18*18, 22*22 or 28*28.
  • 6 and 9. So one number being squared must end in 4 or 6 and the second number being squared must end in 3 or 7. SO the first perfect square could be 4*4, 6*6, 14*14, 16*16, 24*24 or 26*26. The second perfect square could be 3*3, 7*7, 13*13, 17*17, 23*23 or 27*27.

\n" ); document.write( "This may seem like a lot of trial and error. But without this logic regarding the ones digits, we would have to try every possible combination of 2 of these 30 possible perfect squares (which is 30*30 = 900 possible combinations). With the logic above we have reduced the possible combinations down to 81.

\n" ); document.write( "To be honest, I have not tried all 81 possible combinations. I stopped as soon as I found one that worked. From the middle group above, I found that 29*29 + 2*2 = 841 + 4 = 845. There may be others. too.
\n" ); document.write( "
\n" );