# Is there a counterexample to "For all integers $a,b, d$, if $d\mid(3a+2b)$ and $d\mid(2a+b)$, then $d\mid a$ and $d\mid b$."

I've tried to solve this problem, but I keep getting stuck at the end.

Assume $$a, b$$ , and d are integers and $$d$$ $$\neq$$ 0.

$$3a+2b = dm,\,\,\,$$ for some integer $$m$$.

$$2a+b = dn,\,\,\,$$ for some integer $$n$$.

$$3a+2b - 2a - b = dm - dn$$.

$$a + b = d(m-n)$$.

That's where I'm stuck now, because $$a=d(m-n)-b or b=d(m-n)-a$$ doesn't prove $$d\mid a$$ or $$d\mid b$$, unless I'm missing something or took a wrong turn somewhere.

• Thanks to everyone that replied, you were all very helpful. Oct 3 '14 at 0:29

$$d|(3a+2b)-(2a+b)\iff d|a+b$$ hence
$$d|(2a+b)-(a+b)\iff d|a$$ and $$d|(2a+b)-2(a+b)\iff d|-b\iff d|b$$
There is no counterexample: $$\begin{array}{c} 6a + 4b = 2md \\ 6a + 3b = 3nd \\ b = (2m-3n)d \rightarrow d|b \\ 6a + (8m-12n)d = 2md \\ 6a = (-6m -12n) d \\ a = (-2m+3n)d \rightarrow d|a \end{array}$$
$$3a+2b=dm, \quad 2(2a+b)=2dn\Longrightarrow a=d(2n-m),\quad$$ and $$2(3a+2b)=2dm, \quad 3(2a+b)=3dn\Longrightarrow b=d(2m-3n).$$
By hypothesis, $m=\frac{3a+2b}d$ and $n=\frac{2a+b}d$ are integers. Solving the linear equations $$3(\frac ad)+2(\frac bd)=m$$ $$2(\frac ad)+(\frac bd)=n$$ for $\frac ad$ and $\frac bd$, we get $\frac ad=2n-m\in\mathbb Z$ and $\frac bd=2m-3n\in\mathbb Z$.