For positive integers $a, b$, and $c$, show that if $\gcd(a,b)=1$ and $c\geq (a-1)(b-1)$ then $c=as+bt$ for some non-negative $s,t$.
The problem is from Ex.1.17 of V.2 of Shoup's "A Computational Intro to Number Theory and Algebra" book:
Let a,b,c be positive integers satisfying: $\gcd(a,b)=1$ and $c\ge(a-1)(b-1)$. Show that there exists non-negative $s,t$ such that $c=as+bt$.
$\gcd(a,b)=1 \iff \exists s,t\in \Bbb{Z}$ s.t. $as+bt=1$
Let $c=ab-a-b+p$ where $p\gt0$
I considered: $c=ab-a-b+p=ab-a-b+p(as+bt)$
I also tried: $c=ab-a-b+p=(ab-a-b+p)(as+bt)$
and perhaps by some clever factoring into a $(aS + bT)$ form it can be shown that $S,T$ can be both non-negative for some $s,t$ satisfying $as+bt=1$
Perhaps this is not the right approach... Could any one help?
In the search for a solution online, I've found a homework+solution file reposing a similar exercise from V.1 of Shoup's book with a relaxed lower bound for $c$:
For positive integers $a,b$ s.t. $\gcd(a,b)=1$, any $c\ge ab$ could be expressed as $c=as+bt$ for some non-negative integers $s, t$. (Basically $ab$ instead of $(a-1)(b-1)$ as a lower bound for $c$)
The given solution in that pdf file is not very clear to me. It uses the smallest positive $s_1$ that satisfies $as_1 + bt=1$ (for some corresponding $t$) to construct a $c$: $c=as_1+bt_1$ and shows that $t_1\gt 0$. I don't understand how one fixed $s_1$ can be used to construct all integers $\ge ab$.
What did I miss?
With John Omielan's pointer, I've learnt that the problem is just a rephrasing of the $n=2$ case of Frobenius Coin Problem. However, I personally feel that the proof for the n=2 case described in that Wikipedia page is not too straightforward. From other more in-depth articles on the subject, I have put together a, hopefully, clearer proof:
Since $\gcd(a,b)=1$, any $c\in \Bbb{Z}$ can be expressed as $c=as+bt$ for some $s,t \in \Bbb{Z}$.
Rewrite $t$ in terms of $a$ as a division by $a$: $\quad t=ka+r\quad $ s.t. $\quad 0\le r \le (a-1)$
Sub back in: $\quad c= as + b(ka + r) = a(s+kb) + br$
Therefore any $c \in \Bbb{Z}$ can be written as $c = ax + br$ for some $x$ and $0\le r \le (a-1)$. Since both $a$ and $b$ are positive, the max value of $c$ that can be written this way with $x<0$ is: $\quad c=-a + b(a-1) = ab -a -b\quad$ ($x=-1$ and $r=a-1$)
Therefore any $c \ge ab-a-b + 1 = (a-1)(b-1)$ cannot have $x<0$.
Therefore any $c \ge (a-1)(b-1)$ can be written as $c= ax + br \quad$ for some $x\ge0$ and $0\le r\le(a-1)$.