Page:Amusements in mathematics.djvu/178

166 factor, for the repetition of factors is subject to another law. We cannot express 25, (5×5), in two ways, but only in one; yet 125, (5×5×5), can be given in two ways, and so can 625, (5×5×5×5); while if we take in yet another 5 we can express the number as the sum of two squares in three different ways.

If a prime of the second form gets into your composite number, then that number cannot be the sum of two squares. Thus 15, (3x5), will not work, nor will 135, (3x3x3x5); but if we take in an even number of 3's it will work, because these 3's will themselves form a square number, but you will only get one solution. Thus, 45, (3×3×5, or 9×5) = 36 + 9. Similarly, the factor 2 may always occur, or any power of 2, such as 4, 8, 16, 32; but its introduction or omission will never affect the number of your solutions, except in such a case as 50, where it doubles a square and therefore gives you the two answers, 49 + 1 and 25 + 25.

Now, directly a number is decomposed into its prime factors, it is possible to tell at a glance whether or not it can be split into two squares; and if it can be, the process of discovery in how many ways is so simple that it can be done in the head without any effort. The number I gave was 130. I at once saw that this was 2×5×13, and consequently that, as 65 can be expressed in two ways (64 + 1 and 49 + 16), 130 can also be expressed in two ways, the factor 2 not affecting the question.

The smallest number that can be expressed as the sum of two squares in twelve different ways is 160,225, and this is therefore the smallest army that would answer the Sultan's purpose. The number is composed of the factors 5×5×13×17×29, each of which is of the required form. If they were all different factors, there would be sixteen ways; but as one of the factors is repeated, there are just twelve ways. Here are the sides of the twelve pairs of squares: (400 and 15), (399 and 32), (393 and 76), (392 and 81), (384 and 113), (375 and 140), (360 and 175), (356 and 183), (337 and 216), (329 and 228), (311 and 252), (265 and 300). Square the two numbers in each pair, add them together, and their sum will in every case be 160,225.

137.—A STUDY IN THRIFT. will have to save a tremendous sum out of her housekeeping allowance if she is to win that sixth present that her canny husband promised her. And the allowance must be a very liberal one if it is to admit of such savings. The problem required that we should find five numbers higher than 36 the limits of which may be displayed so as to form a square, a triangle, two triangles, and three triangles, using the complete number in every one of the four cases.

Every triangular number is such that if we multiply it by 8 and add 1 the result is an odd square number. For example, multiply 1, 3, 6, 10, 15 respectively by 8 and add 1, and we get 9, 25, 49, 81, 121, which are the squares of the odd numbers 3, 5, 7, 9, 11. Therefore in every case where $$8x^2+1=$$a square number, $$x^2$$ is also a triangular. This point is dealt with in our puzzle, "The Battle of Hastings." I will now merely show again how, when the first solution is found, the others may be discovered without any difficulty. First of all, here are the figures:—

The successive pairs of numbers are found in this way:—

and so on. Look for the numbers in the table above, and the method will explain itself.

Thus we find that the numbers 36, 1225, 41616, 1413721, 48024900, and 163432881 will form squares with sides of 6, 35, 204, 1189, 6930, and 40391; and they will also form single triangles with sides of 8, 49, 288, 1681, 9800, and 57121. These numbers may be obtained from the last column in the first table above in this way: simply divide the numbers by 2 and reject the remainder. Thus the integral halves of 17, 99, and 577 are 8, 49, and 288.

All the numbers we have found will form either two or three triangles at will. The following little diagram will show you graphically at a glance that every square number must necessarily be the sum of two triangulars, and that the side of one triangle will be the same as the side of the corresponding square, while the other will be just 1 less.



Thus a square may always be divided easily into two triangles, and the sum of two consecutive triangulars will always make a square. In numbers it is equally clear, for if we examine the first triangulars—1, 3, 6, 10, 15, 21, 28—we find that by adding all the consecutive pairs in turn we get the series of square numbers—4, 9, 16, 25, 36, 49, etc.

The method of forming three triangles from our numbers is equally direct, and not at all a matter of trial. But I must content myself with giving actual figures, and just stating that every triangular higher than 6 will form three triangulars. I give the sides of the triangles, and readers will know from my remarks when