Wikipedia:Reference desk/Archives/Mathematics/2017 July 26

= July 26 =

Diophantine Equation
Let a be some natural number. What are the solutions in integers of the equation $$x^2+4a=y^2$$? עברית (talk) 16:32, 26 July 2017 (UTC)
 * Any even difference of 2 squares is divisible by 4, so there are many solutions to that equation! Georgia guy (talk) 16:38, 26 July 2017 (UTC)


 * Try rewriting as $$y^2 - x^2 = 4a$$, and then factor and solve in terms of the factors of 4a. Considering whether the factors are even or odd should let you simplify further.  --Deacon Vorbis (talk) 16:47, 26 July 2017 (UTC)


 * Some random thoughts:
 * Consider a prime number p≠2 that divides both x and y, then p² must divide a since it divides 4a and not 4, and then (x/p, y/p) is solution for a/p². Hence, the general solution should be easily generated from the solutions where $$GCD(x,y)=2^k$$ by stripping a from its square divisors.
 * For the divisibility by 2: Obviously x and y are both odd or both even. If they are even, the equation reduces to $$a=(y'-x')(y'+x')$$ where $$2x'=x,2y'=y$$. If they are odd, $$4a=y^2-x^2=(2y'+1)^2-(2x'+1)^2 = 4y'^2-4x'^2 + 4y' - 4x' $$ which reduces to $$a=(y'-x')(y'+x'+1)$$. Both equations look quite attackable by looking at the pairs m,n such that a=m*n, and retrieving x,y as a function of m,n. Tigraan Click here to contact me 17:24, 26 July 2017 (UTC)
 * A curious fact is that the equation always has at least two solutions $$x=a-1$$, $$y=a+1$$ and $$x=-a+1$$, $$y=-a-1$$. These are the only solutions if $$a$$ is simple. Ruslik_ Zero 17:32, 26 July 2017 (UTC)


 * Thank you! עברית (talk) 19:40, 26 July 2017 (UTC)