# Pattern Recognition Problem: If $7,24 \to 25 ; 12,35 \to 37;$ … , then M=?

A friend has given me a puzzle to solve, the puzzle is as follows: $$\color{red}{7 \, , } 24 \to \color{blue}{25}$$ $$\color{red}{12 \, , } 35 \to \color{blue}{37}$$ $$\color{red}{11 \, , } 60 \to \color{blue}{61}$$ $$\color{red}{8 \, , } 15 \to \color{blue}{17}$$ $$\color{red}{9 \, , } 40 \to \color{blue}{\text{M}}$$ then $$\color{blue}{\text{M}}$$=?

41 because $$red^2 + black^2 = blue^2$$.

These are all

Examples of Pythagorean triples, and so $$9^2 + 40^2 = 81 + 1600 = 1681$$, and then $$\sqrt{1681} = 41 = M$$.

Although El-Guest answer appears correct for all the listed cases, there could be a simpler answer, which is:

if red is uneven then black + 1 else if red is even then black + 2

• Huh. I do think that @El-Guest is correct, but this is very interesting. – Brandon_J Mar 13 '19 at 13:37
• There are plenty of example cases that would satisfy the intended solution but not this one (e.g., $\color{red}{28 \, , } 45 \to \color{blue}{53}$), and there are plenty of example cases that would satisfy this solution but not the intended one (e.g., $\color{red}{4 \, , } 5 \to \color{blue}{7}$). It's a shame that no case like either of these was in the puzzle to make the solution unambiguous. – Joseph Sible-Reinstate Monica Mar 14 '19 at 4:02
• See also this picture (warning: spoiler for the intended solution). The overlap between the two solutions happens to be everything along the left and bottom edges in it. – Joseph Sible-Reinstate Monica Mar 14 '19 at 4:14