# When $\frac {a^3-b^3}{a^2-b^2}$ is an integer?

If $$\frac {a^3-b^3}{a^2-b^2}$$ is an integer, then supposing $$a-b \ne 0$$ we have that also$$\frac {a^2+ab+b^2}{a+b}$$ is an integer.

For which $$a, b\in\mathbb Z$$, the fraction $$\frac {a^2+ab+b^2}{a+b}$$ is an integer?

• Note that $\tfrac{a^2+ab+b^2}{a+b}=a+\tfrac{b^2}{a+b}$, so $(a,b)=(d-b,b)$ where $d$ is any divisor of $b^2$. Jan 26, 2020 at 17:37
• $\frac {a^2 + ab + b^2}{a+b} = \frac {(a + b)^2 - ab}{a+b}$ We get an integer when $(a+b)|ab$ Jan 26, 2020 at 18:20
• It seems that you ask about $a,b\in\mathbb Z$ or $a,b\in\mathbb N$, but it might be good to say so explicitly also in the question. Jan 26, 2020 at 18:42
• @MartinSleziak I did but someone edited that Jan 26, 2020 at 18:43

Assuming $$a\neq b$$, we want that $$\frac{a^2+ab+b^2}{a+b}=(a+b)-\frac{ab}{a+b}$$ is an integer. The solutions of $$\frac{ab}{a+b} = k,$$ assuming $$a+b\neq 0$$, are the solutions of $$ab-ka-kb = 0,$$ i.e. the solutions of $$(a-k)(b-k) = k^2,$$ which depend on the couples of divisor/complementary divisor of $$k^2$$.
In general, for any $$d\mid k^2$$ we have the solution $$a=d+k,\qquad b=\frac{k^2}{d}+k.$$

Equation, $$(a^2+ab+b^2)=p(a+b)$$

where "p' is integral.

while solution given by "Jack D'Aurizio" is nice & since

'OP' needs $$(a,b)$$ to be integer's there is a

fraction $$(k^2/d)$$ to be taken care of in his solution.

If instead we take, $$(a,b)=[d(k+1),dk(k+1)]$$ then we get:

$$p=d(k^2+k+1)$$

For, $$(d,k)=(5,2)$$ we get:

$$(a,b,p)=(15,30,35)$$

A trivial example is for $$a,b \in \mathbb{Z}$$ such that $$a+b=1$$