Prove that for any integer value of D, the equation 27x + 14y = D has integer solutions for x and y. Prove that for any integer value of $D$, the equation $27x + 14y = D$ has integer solutions for $x$ and $y$.
 A: If you can find $27x_0 + 14y_0 = 1$ then can find $27(D*x_0) + 14(D*y_0) = D$.
A: I'm by no means a math expert, but it seems to me that if you can solve for D=1, (x = -1, y = 2), then multiplying the entire equation by any integer, results in an integer solution for the general equation.  I don't know how to put this into mathematical proof terms, but basically because there is a solution where D = 1, then multiplying the entire equation by some arbitrary integer c means that for any integer D, there is a solution, because you can multiply both x and y by the same number, and get a solution.
Maybe someone else can give a more formal explanation of what I'm trying to say.
A: $$27x+14y=D(28-27)$$
$\iff27(x+D)=14(2D-y)$
$\dfrac{14(2D-y)}{27}=x+D$ which is an integer
$\implies27|14(2D-y)\implies27|(2D-y)$ as $(14,27)=1$
$\dfrac{2D-y}{27}=c$(say) where $c$ is an arbitrary integer
$\implies y=?$
$\implies x=?$
A: I see you have already some interesting answers and I will try another way to explain.
Let us make prime number factorization of numbers $27$ and $14$:
$$27 = 2^0\times 3^3\times 7^0\\14=2^1\times3^0\times 7^1$$
They don't have any non-zero exponent for the same prime base. This means $27$ and $14$ are relatively prime. If they were not relative prime, they would have some common factor $K>1$ and we could write $$K(ax+by)=D$$
But since any number $D$ is not divisible by any given common factor $K>1$, we are sure to be able to hit it.
An example if we did not have relative prime numbers is $$27x+15y=D \Leftrightarrow 3(9x+5y)=D$$
Which we can see that it could only be sure to fit if $D$ was divisible by $3$.
