I need to find minimum value of c above which there always exists a non-negative solution for the equation
$$4x + 7y = c$$ I tried using Diophantine equation but I am not able to find the mistake in my approach, could someone please point out? :
$$4x + 7y = c$$ where $x,y\geq 0$ and $GCD(x,y) = 1$.
$x = 2c$ and $y = -c$ satisfies the above equation.
Now $x_0 = 2c - 7t$ and $y_0 = -c + 4t$ (Diophantine equation solution)
$$2c - 7t \geq 0\implies t \leq 2c/7$$
Similarly
$$t\geq c/4$$
therefore $2c/7 - c/4 \geq 0$ which gives $c \geq 28$ but I know the answer for this is $18$.
Lemma: If $x,y$ are real and $y-x>1$ then there is an integer $t$ such that $x<t<y$.
I'll let you prove that.
So your argument actually shows that if $c\geq 29$ then $2c/7-c/4>1$, and therefore there is a solution to $4x+7y=c$ with $x,y>0$. Then $4(x-1)+7(y-1)=c-11$ has a solution, and hence if $c\geq 18$, solve $4x_0+7y_0=c+11$ with $x_0,y_0>0$, and then $x=x_0-1$ and $u=y_0-1$ is a non-negative solution to $4x+7y=c$.
Note, this does not prove that $18$ is the smallest - to do that, you have to show that $4x+7y=17$ has no non-negative solution, or, equivalently, that there is no integer in the range $[17/4,34/7]$.
This also shows you how you get the coin problem result. If $a,b$ are relatively prime, first show that if $c\geq ab+1$, then $ax+by = c$ has a positive solution. But that means that if $c\geq ab+1 - a - b = (a-1)(b-1)$ then $ax+by=c$ has a non-negative solution.
And then, again, you need to show that there is no solution when $c=(a-1)(b-1)-1=ab-a-b$. But that can be done as follows. We can quickly show that $$a(b-1) + b(-1)= ab-b-a$$ so any integer solution to $ax+by=ab-b-a$ must be of the form: $$x_0 = b-1 - bt, y_0=-1+at$$
But if $x_0=b-1-bt\geq 0$ then $t<1$ and if $y_0=-1+at\geq 0$ then $t>0$. There is no integer between $0$ and $1$, so there is no non-negative solution to $ax+by= ab-a-b$.