Do $a$ and $b$ always exist? If not, for what conditions do they exist?
Asked
Active
Viewed 65 times
-2
-
There is no $a,b\in\mathbb{N}$ such that $a^2-b^2=2$ – ə̷̶̸͇̘̜́̍͗̂̄︣͟ Dec 27 '17 at 19:28
-
Every positive odd number can be written in the form $a^2+b$2$, as well as some even numbers. – For the love of maths Dec 27 '17 at 19:33
-
See https://math.stackexchange.com/a/547420/589 – lhf Dec 27 '17 at 20:01
2 Answers
2
Note that $a^2-b^2 = (a+b)(a-b)$ and see that $a+b$ and $a-b$ differ by $2b$ (an even number). So an $a$ and $b$ exist such that $a^2-b^2 = x$ if and only if you can factor $x$ as the product of two integers which are both odd or both even. In fact, then $x$ has to be an odd number (since product of two integers is both odd) or it has to be divisible by $4$ (since it must be divisible by two even numbers).

user2825632
- 2,881
2
Generally:
- If $x=4k$, then $(k+1)^2-(k-1)^2=x$
- If $x=2k+1$, then $(k+1)^2-k^2=x$
- If $x=4k+2$ then there are no solutions, because $a^2\equiv 0 \;\text{or}\; 1\pmod 4$, similar for $b^2$, so $a^2-b^2\equiv 0, 1 \;\text{or}\; 3\pmod 4$.