# Is it possible to solve for $a, b \in \mathbb{N}$?

I need to solve the following equation so that both $a$ and $b$ are natural numbers.

$$ab - 2a = 2b$$

I must also prove that the solutions found are the only ones possible.

Is it possible to do so, and if yes how can I do it? Can this be solved as some type of diophantine equation?

• $ab=2(a+b)$ means $a\mid 2b$ and $b\mid 2a$. No Diophantine equations needed. – Dietrich Burde Feb 23 '15 at 16:34

Hint:

$$ab-2a=2b\iff (a-2)(b-2)=4$$

Hint $\ b\neq 2\,\Rightarrow\ a = \dfrac{2b}{b-2} = 2 + \dfrac{4}{b-2}$

$(0,0)$ is a solution.

It can't be that $b = 1$, neither can it be that $b = 2$. Assume $b > 2$.

Considering the equation modulo $b - 2$, we get that $b - 2$ divides $4$. We conclude that $b - 2$ is either $1$, or $2$, or $4$. So $b = 3$ or $b = 4$ or $b = 6$. It happens that all of these give solutions.

Therefore the solutions are $(0,0)$, and the pairs for which $b \in \{3,4,6\}$.

• Thank you! :). Can you please show me how you get that $b-2$ divides $4$? :) – DJS Feb 23 '15 at 16:49
• You're welcome. Of course, since $b - 2$ divides itself, we have that $b - 2 \equiv 0 \pmod{b - 2}$, so $b \equiv 2 \pmod{b - 2}$. Look at the initial equation: $a(b - 2) = 2b$. As $b - 2 \equiv 0 \pmod{b - 2}$, we get $a(b - 2) \equiv 0 \pmod {b - 2}$, hence $2b \equiv 0 \pmod{b - 2}$, but $b \equiv 2 \pmod{b - 2}$, thus $4 \equiv 0 \pmod{b - 2}$. – user207710 Feb 23 '15 at 16:57
• Thank you!! :) :). And this proves that these are the ONLY possible solutions? :). i.e, that no other possible pair of natural numbers can satisfy the given equation ? :) – DJS Feb 23 '15 at 17:10
• Yes, this shows that these are the only solutions. I edited the post because the previous argument was missing something. – user207710 Feb 23 '15 at 17:24