quasi
Posts:
12,012
Registered:
7/15/05


Re: A quicker way?
Posted:
Feb 4, 2013 10:27 AM


luttgma@gmail.com wrote:
>Let n^2 = N + a^2, where n, N and a are integers. >Knowing N, it is of course possible to find n by trying > a = 1, 2, 3, 4, etc... >But doesn't exist a quicker way ?
if you rewrite the equation in the form
(n  a)(n + a) = N
then for each pair of integers u,v with u*v = N, you can solve the equations
n  a = u n + a = v
for n and a.
quasi

