<s>[INST] Let $r, s, t$ be integers. Suppose $\gcd(a, b) = 1$. Let $d = \gcd(a − b, ra^2 + sab + tb^2 )$. Show that $d|(r + s + t)$. Let $r, s, t$ be integers. Suppose $\gcd(a, b) = 1$. Let $d = \gcd(a − b, ra^2 + sab + tb^2)$. Show that $d|(r + s + t)$.
Any hints for this question? I am stuck with it for days.
 [/INST] Since $d$ divides $a - b$, there exists an integer $c$ such that $a = b +cd$. Since we also have $ra^2 + sab + tb^2 \equiv 0 \bmod d$, one gets
$$
ra^2 + sab + tb^2 = r(b +cd)^2 + s(b +cd)b + tb^2 \equiv 0 \bmod d
$$
whence
$$
(r+s+t)b^2 = rb^2 + sb^2 + tb^2 \equiv 0 \bmod d.
$$
Since $\gcd(a,b) = 1$, there exist by Bézout's identity two integers $n$ and $m$ such that $na + mb = 1$. Since $a \equiv b \bmod d$, it follows that
$$
1 = na + mb \equiv nb + mb \equiv (n+m)b \bmod d.
$$
Thus $b^2(n+m)^2 \equiv 1 \bmod d$ and
$$
(r+s+t)b^2(n+m)^2 \equiv  (r+s+t) \equiv 0 \bmod d.
$$
Therefore $d$ divides $r+s+t$.
</s>