0

I have the following equation:

$$ a \cdot y - b\cdot x = (2 b + a)/3 $$

where $a,b$ are positive integer parameters. I would like to find positive integers $x,y$ that satisfy this equation. Note that $a,b$ are parameters, so the solution will be a function of $a$ and $b$.

If $x,y$ is a solution, then $x+a,y+b$ is a solution too, so there are infinitely many solutions; but I only need one.

How can I decide whether there is a solution, and find one if it exists?

Bill Dubuque
  • 282,220
  • @BillDubuque can you explain why this question is a duplicate? It is true that the other question is also about an equation involving integers, but it is a different equation. – Erel Segal-Halevi Jan 04 '25 at 19:52
  • Rearrange OP equation to $\ \small\dfrac{3x+2}{3y-1} = \dfrac{a}b,$ which has the same form as in the dupe, therefore by Unique Fractionization we deduce $,\small \begin{align} 3x+2 &=, a,k^{\phantom{|^{|^|}}}\ 3y-1 &=, b,k\end{align}$ (assuming wlog $,a,b,$ coprime, i.e. $a/b$ in least terms). $\ \ $ – Bill Dubuque Jan 04 '25 at 20:13
  • 1
    @BillDubuque By this line of reasoning all questions are dupes because they are about methodically solving math problems. The fact that you need to explain how to transform this question into the other, but cannot fit the details in a comment, should suggest that they are not duplicates in any practical sense. – Servaes Jan 04 '25 at 20:33
  • @Servaes Said rearrangement to standard form merely collects the coef's of $,a,$ and $,b.,$ Would you similarly attempt to argue that a question on finding a formula for the roots of $\ ax^2+bx + c = dx +e \ $ is not a dupe of questions on the quadratic formula? For site policy on dupes see abstract duplicates and EoFS = Enforcement of Quality Standards. – Bill Dubuque Jan 04 '25 at 20:56

1 Answers1

3

Let $a,b\in\Bbb{Z}$ be given. Let $x,y\in\Bbb{Z}$ be such that $$ay-bx=\frac{a+2b}{3}.\tag{1}$$ Without loss of generality $a$ and $b$ are coprime, and we can clear denominators to get $$a(3y-1)=b(3x+2).$$ It follows that $b$ divides $3y-1$ and $a$ divides $3x+2$, so $$y=\frac{kb+1}{3},\qquad\text{ and }\qquad x=\frac{ka-2}{3},$$ for some $k\in\Bbb{Z}$. Note that this implies $a\equiv b\pmod{3}$.

Servaes
  • 67,306
  • 8
  • 82
  • 171
  • So if $a\not\equiv b \mod 3$ then a solution does not exist. Also if $a\equiv b \equiv 0 \mod 3$ then a solution does not exist, as the expressions for $x,y$ are not integers. But in all other cases, a solution exists? – Erel Segal-Halevi Jan 03 '25 at 13:35
  • 1
    @ErelSegal-Halevi Your first remark is correct, and also clear from the fact that $$ay-bx=\frac{a+2b}{3}=\frac{a-b}{3}+b,$$ where $ay-bx$ and $b$ are integers, so $\tfrac{a-b}{3}$ is an integer, meaning that $a\equiv b\pmod{3}$. – Servaes Jan 03 '25 at 13:41
  • 1
    @ErelSegal-Halevi As for your second remark, note that the 'without loss of generality' precludes this possibility. More explicitly, writing $a=dA$ and $b=dB$ with $\gcd(A,B)=1$ all solutions are of the form $y=\frac{kB+1}{3}$ and $x=\frac{kA-2}{3}$, if $A\equiv B\pmod{3}$. There are no solutions if $A\not\equiv B\pmod{3}$. – Servaes Jan 03 '25 at 13:42
  • Thanks a lot for the detailed explanations. – Erel Segal-Halevi Jan 04 '25 at 19:52