1.2: Problem 26: Let \(s\) and \(g > 0\) be given integers. Prove that integers \(x\) and \(y\) exist satisfying \(x + y = s\) and \((x, y) = g\) if and only if \(g \mid s\).

Proof

\(\Rightarrow\): Suppose that \((x,y)=g\), then \(x = gm\) and \(y = gn\) for some \(m,n \in \mathbb{Z}\). We are also given that \(x+y=s\). Observe that

$$ \begin{align*} x + y &= s \\ gm + gn &= s. \end{align*} $$

Since \(g \mid gm\) and \(g \mid gn\), then \(g \mid s\).
\(\Leftarrow\): Suppose now that \(g \mid s\), then \(s = gk\) for some \(k \in \mathbb{Z}\). Write \(k = a + b\) where \(a = 1\) and \(b = k-1\). We know that \((1, k-1) = 1\) for any \(k \in \mathbb{Z}\). Then

$$ \begin{align*} s = gk = g(a + b) = ga + gb \end{align*} $$

So let \(x = ga = g\) and \(y = gb = g(k-1)\). Then, \(s = x + y = g + g(k - 1) = gk\). Moreover, \((x,y) = (ga, gb) = (g, g(k-1)) = g(1, k-1) = g\) as we wanted to show. \(\ \blacksquare\).


References