# How to find the integer solution for $6x + 25 = 7y$?

When I type this equation ($$6x + 25 = 7y$$) into WolframAlpha, it is able to tell me that the integer solution for this equation is:

$$x = 7n + 4$$, $$y = 6n + 7$$, where n in the set of all integers

How can I arrive at this solution on my own?

• Hint $\ (7 - 6 = 1)\$ times $25.\$ Generally use the [Extended Euclidean Algorithm](math.stackexchange.com/a/85841/242) to get the Bezout identity $\, ja + kb = c\,$ for $\,\gcd(a,,b) = c\,$ then scale that as need be. Commented Jan 29, 2019 at 20:34
• Plug in the solution and see what the result is. Can you now do the backwards operation? Commented Jan 29, 2019 at 20:36
• @PeterChikov what if I don't know the solution? Commented Jan 29, 2019 at 20:41
• And see this answer for the form of the general solution (= particular + homogeneous solution) Commented Jan 29, 2019 at 20:45
• Thanks @BillDubuque I will take a look at these! Commented Jan 29, 2019 at 20:48

Since $$6\mid 6y-24$$ and $$6\mid 7y-25$$ we have $$6\mid (7y-25)-(6y-24)=y-1$$

Thus $$y-1 = 6t$$ for some integer $$t$$, so $$\boxed{y= 6t+1}$$ and pluging in $$6x+25=7y$$ we get: $$6x+25 =42t+7\implies \boxed{x= 7t-3}$$

It looks on first sight that I got different solution, but that is not true.

Puting $$n=t-1$$ we get $$y=6t+1= 6(t-1)+7=6n+7$$ and $$x= 7(t-1)+4=7n+4$$

• What does the vertical pipe symbol mean? Is there an article I can read to learn about that? Commented Jan 30, 2019 at 11:07
• $a\mid b$ means $a$ divide $b$, so $3\mid 12$ is true, while $8\mid 4$ is not. Commented Jan 30, 2019 at 11:08
• The only potential problem I might see with this is that I don't think $7y - 25$ will always be divisible by $6$. For example, when $y = 0$. Commented Feb 1, 2019 at 11:09
• Is 0 of form 6n+7? Commented Feb 1, 2019 at 13:09
• Ahh I see now. My bad. Please disregard my last comment. Commented Feb 1, 2019 at 13:37