# Right triangle with a 23

[Madan Musuvathi asked me this question.]

Find two positive integers that together with 23 are the lengths of a right triangle.

[Madan first told me 17, which I could solve right away, because I had just finished reading Mark Haddon’s novel The curious incident of the dog in the night-time, which toward the end mentions that a triangle with sides n2+1, n2-1, and 2*n, where n>1, is a right triangle. Madan then asked me about 23.]

[A follow-up question.]

There’s a simple technique that, given any odd positive integer, allows you to figure out the other two integer sides of a right triangle in your head (or with pen and paper if the numbers get too large). Find this technique.

Hint: Think of every number as a multiset of prime factors, so that multiplying the prime factors gives you the number. Move one of the addends of the Pythagorean Theorem to the other side and factor it (a technique I recently learned from Raymond Boute).

©2020 K.R.M. Leino - Split Template by One Page Love