<s>[INST] Integer solutions of $2a+2b-ab\gt 0$ Let $a\in\mathbb{N}_{\ge 3}$ and $b\in\mathbb{N}_{\ge 3}$. What are the solutions of the Diophantine inequality
$$2a+2b-ab\gt 0?$$
By guessing, I found 5 solutions:
$$\text{1)}\, a=3,\, b=3$$
$$\text{2)}\, a=3,\, b=4$$
$$\text{3)}\, a=4,\, b=3$$
$$\text{4)}\, a=5,\, b=3$$
$$\text{5)}\, a=3,\, b=5.$$
Are these all the solutions? How could I find all the solutions rigorously?
 [/INST] $2a+2b-ab>0$ is equivalent to $(a-2)(b-2)<4$, or to $(a-2)(b-2) \le 3$. If $a \ge 3$ and $b \ge 3$, then $(a-2)(b-2) \ge 1$. Thus, $(a-2)(b-2) \in \{1,2,3\}$.
$\bullet$ If $(a-2)(b-2)=1$, then $a-2=b-2=1$, so that $(a,b)=(3,3)$.
$\bullet$ If $(a-2)(b-2)=2$, then $\{a-2,b-2\}=\{1,2\}$, so that $\{a,b\}=\{3,4\}$.
$\bullet$ If $(a-2)(b-2)=3$, then $\{a-2,b-2\}=\{1,3\}$, so that $\{a,b\}=\{3,5\}$.
Therefore, we have the five solutions $(a,b)=(3,3), (3,4), (4,3), (3,5),\:\text{or}\: (5,3)$. $\blacksquare$
</s>