1

Let $a,b$ be integers with $\gcd(a,b)=1$. What is then the largest integer $N$ which cannot be written as a linear combination with non-negative integer coefficients of $a$ and $b$?

A few days ago, I came up with the following elementary proof.

Because $\gcd(a,b)=1$, the diophantine equation $$ax+by=N$$ has infinitely many solutions if $x,y$ are allowed to be negative. The solutions can be written parametrically as $$x=Nx_0-bt, \ y=Ny_0+at$$ with $t \in \mathbb{Z}$ and $(x_0,y_0)$ satisfying $ax_0+by_0=1$.

The integers $x$ and $y$ must be nonnegative for an attainable number, which we may write as $x,y>-1$, which is equivalent to $$-1/a-Ny_0/a<t<Nx_0/b+1/b$$ The largest $N$ for which this fails satisfies $$(Nx_0/b+1/b)-(-1/a-Ny_0/a)=1$$ whence $$N=ab-(a+b)$$ as desired.

However, I recall reading a much more complicated proof based on complete residue systems in a book on number theory some years ago. Does this alternative proof seem familiar to anyone?

Étienne Bézout
  • 1,752
  • 1
  • 11
  • 20
  • @T.Bongers Wait a little, I'll change my question. I'm actually looking for an alternative proof. I came up with the proof above a few days ago, but also recall reading some much more elaborate proof in a number theory book a while ago. Could this be a valid question? – Étienne Bézout Feb 27 '16 at 21:45
  • I have gotten into the habit of referring askers to this answer by Robjohn. Not sure how well it compares. Anyway, there are more links to related threads there. – Jyrki Lahtonen Feb 27 '16 at 21:53
  • @JyrkiLahtonen I assume you are referring to his theorem 1. The proof he gives (although the statement is different), is basically the proof I have above. – Étienne Bézout Feb 27 '16 at 21:58

0 Answers0