My grandson became intrigued when he recently 'did' Pythagoras at elementary school. He was particularly interested in the 345 triangle, and the fact that his teacher told him there was also a 51213 triangle, i.e. both rightangled triangles with whole numbers for all three sides. He noticed that the shortest sides in the two triangles were consecutive odd numbers, 3 & 5, and he asked me if other right angled triangles existed, perhaps 'built' on 7, 9, 11 and so on. I didn't know where to start on this, but, after trying all sorts of ideas, we discovered that the centre number in a 3order 'magic square' was 5, i.e. (1+9)/2, and that 4 was 'one less'. Since the centre number in a 5order 'magic square' was 13 and that 12 was 'one less' he reckoned that he should test whether a 7order square would also generate a rightangled triangle for him. He found that 72425, arrived at by the above process, also worked! He tried a few more at random, and they all worked. He then asked me two questions I can't begin to answer ...
Can you help? What wonderful observations! These are the sort of questions one should ask when learning how to do mathematics. I don't see where the magic squares will help much, but the other ideas are promising. For the whole story, one should consult an elementary number theory text that deals with "Pythagorean Triples". There were two earlier questions on that topic in our Queries and Quandries file. Our answer there shows how to find all Pythagorean triples. The short answer is that for any two integers r and s with s > r, if you set a = 2rs, b = s^{2}  r^{2}, and c = r^{2} + s^{2}, then a^{2} + b^{2} = c^{2}, so that (a, b, c) is a Pythagorean triple. For example, r = 1, s = 2 gives the (4, 3, 5) triangle; r = 2, s = 5 produces (20, 21, 29). Since any odd number can be written as a difference of consecutive squares, one can certainly get every odd number as a side. Since r can equal 1 and s is arbitrary, any even number can serve as a side. I imagine you can arrange conditions so that the odd side is smallest, but I've never thought about it. Your uniqueness is out: It is easy to find examples with a particular odd number as the side of many right triangles; for example (9,12,15)  which is obtained by multiplying each side of a (3,4,5) by 3  and (9,40,41)  where r = 4 and s = 5. Here is an article that shows how to find all right triangles with a given even number as one of its sides:
