My grandson became intrigued when he recently 'did' Pythagoras at elementary school. He was particularly interested in the 3-4-5 triangle, and the fact that his teacher told him there was also a 5-12-13 triangle, i.e. both right-angled 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 3-order 'magic square' was 5, i.e. (1+9)/2, and that 4 was 'one less'. Since the centre number in a 5-order 'magic square' was 13 and that 12 was 'one less' he reckoned that he should test whether a 7-order square would also generate a right-angled triangle for him. He found that 7-24-25, 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 = s2 - r2, and c = r2 + s2, then a2 + b2 = c2, 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: