# Solve Quadratic diophantine equation in two unknowns.

Determine all $m,n \in \mathbb{Z}^+$ such that $m^2+1$ is a prime number and $10((m^2)+1)=n^2+1.$ Please provide complete explanation with solution. I have made an excel sheet with all the prime numbers from $2$ to $200$ as $= m^2+1;$ and I have calculated $m$ and $n$ as per the conditions given. This is basically as trial and error method. I tried Lagrange's algorithm, but I am not able to understand the algorithm completely. I believe this is a quadratic diophantine equation in two variables?

As $m^2 + 1$ is a prime number it has to be odd ( 2 doesn't satisfy given conditions ), assume the prime number to be of the form of $4k + 1$ (m is even and therefore a multiple of 4) then use the second condition to obtain that $n^2 = 40k + 9$ now n can be 7,13, 27 etc. And you can get corresponding values m by evaluating value of k.

Hope this helps :)

• Thank You Aditya. This did help. I put in the conditions as you stated above in excel sheet, and I got more solutions. However, I am looking for a solution method, which will give me the solutions directly, without the excel sheet. I believe there are infinite recurrent solutions to diophantine equations? Please help. Thank You again. – Math Tise May 10 '18 at 5:23
• To be honest I myself am not very familiar with diophantine eqns.. so can't help you out there... – Aditya Rastogi May 11 '18 at 10:02