# Some doubt on Linear Diophantine equation

We know $ax+by=c$ is solvable iff $(a,b)|c$ where $a,b,c,x,y$ are integers. If $x=2$, $a=\dfrac{k(k+5)}{2}$, $y=k$, $b=k+3$ and $c=2k$, where $k$ is any integer, then $$2 \frac{k(k+5)}{2} - k(k+3) = 2k.$$ So, $\left(\dfrac{k(k+5)}{2}, (k+3)\right) | 2$ for all integral value of $k$. But $k+3$ cannot be even unless $k$ is odd. Where I am going wrong?

-
A newly found article on Diophantine equation iosrjournals.org/iosr-jm/pages/v7i4.html –  user90946 Aug 19 '13 at 8:27

$2k(k+5)/2 - k(k+3)=2k$ with $a=k(k+5)/2$, $x=k$, $y=k$, would mean $b=k+3$, not $k(k+3)$. The conclusion is that $(k(k+5)/2,k+3) | 2k$, not $2$. For example, with $k=3$, $(24,6)=6$.

-
+1: Good eye! ${}$ –  Cameron Buie Jul 2 '12 at 5:14
Good observation, I missed it –  lab bhattacharjee Jul 2 '12 at 5:17

Why does $k+3$ need to be even for the gcd of $k(k+5)/2$ and $k+3$ to divide $2$? For instance, consider the $k=2$ case.

Now, if $2$ had to divide the gcd of those numbers, then we could conclude that $k+3$ must be even.

-
Here, the gcd does not divide 2. But, we have derived that gcd will divide 2 for all integral value of k. –  lab bhattacharjee Jul 2 '12 at 5:07
"So, (k(k+5)/2, (k+3)) | 2 for all integral value of k. =>k+3 is even for all integral value of k" is what you said. This implication fails to hold, with the counterexample $k=2$. I'm simply pointing out that fact. –  Cameron Buie Jul 2 '12 at 5:12

Let $\rm\:j = (k\!+\!3,\, k(k\!+\!5)/2).\,$ The solvability criterion is $\rm\,j\:|\:2k,\,$ not $\rm\:j\:|\:2.\,$ The two are equivalent only when $\rm\:(j,k) = 1\iff (k,3) = 1.$ Otherwise $\rm\:3\:|\:k\:|\:j\:$ thus $\rm \:j\nmid 2.$

-