The Student Room Group

Number theory

If and a and b are relatively prime natural numbers, how many natural numbers cannot be written on the form xa+yb where x and y are nonnegative integers?

My thoughts:
First of all, we want to know the highest number that cannot be written on above form. That will make it easier to then investigate the numbers between 1 and said number that cannot be written on above form.

Let n be a fixed integer (also negative) such that n=ax0+by0.n = ax_{0}+by_{0}. If n lacks solutions for positive x0 and y0, assume that we want x0 to be as small as positive but nonetheless nonnegative. Then the following holds true:
0x0b10 \leq x_{0} \leq b-1
y01y_{0} \leq -1
ax0>nax_{0} > n
We could go as far as state the following since y0 is negative
ax0bnax_{0}-b \geq n
since x0b1x_{0}\leq b-1 we can write
a(b1)bnababna(b-1)-b \geq n \leftrightarrow ab-a-b \geq n

Now to my question: How do I continue to evaluate what numbers in the interval [1,ab-a-b] that may not be written on above form?
(edited 11 years ago)
Reply 1
Actually, all natural numbers can be written in that form.

Since a,ba,b are relatively prime, this implies that gcd(a,b)=1\gcd(a,b) = 1

Then by Bézout's lemma there exists integers x,yx,y such that

xa+yb=gcd(a,b)=1xa + yb = \gcd(a,b) = 1

Do you see how you can now conclude all natural numbers can be written in that form?
(edited 11 years ago)
Reply 2
Original post by Noble.
Actually, all integers can be written in that form.

Since a,ba,b are relatively prime, this implies that gcd(a,b)=1\gcd(a,b) = 1

Then by Bézout's lemma there exists integers x,yx,y such that

xa+yb=gcd(a,b)=1xa + yb = \gcd(a,b) = 1

Do you see how you can now conclude all integers can be written in that form?

I'm sorry if this wasn't clear, but x and y are nonnegative integers whereas x0 is nonnegative and y0 is any integer.
Reply 3
Original post by EulerRules
I'm sorry if this wasn't clear, but x and y are nonnegative integers whereas x0 is nonnegative and y0 is any integer.


Yeah sorry, I realised that and edited my post. You can't make any integer in that case, just the positive ones (or the natural numbers rather).
Reply 4
Original post by Noble.
Yeah sorry, I realised that and edited my post. You can't make any integer in that case, just the positive ones (or the natural numbers rather).

Correct, but the problem is rather figuring out what natural numbers cannot be written on the form ax+yb. I'll edit to "natural numbers" in my OP.
Original post by EulerRules
If and a and b are relatively prime natural numbers, how many natural numbers cannot be written on the form xa+yb where x and y are nonnegative integers?


Famous problem! Try to show that one (and only one) of mm and ababmab-a-b-m is expressible as ax+byax+by
(edited 11 years ago)
Reply 6
Is m a natural number? Say for example a=3, b=7, then ab-a-b-m+1 results in 12-m, and you claim that there is only one m that would satisfy the equation 3x+7y = 12-m which is wrong. Can you please correct me because I'm guessing I have misunderstood the problem.
(edited 11 years ago)
Original post by EulerRules
Is m a natural number? Say for example a=3, b=7, then ab-a-b-m+1 results in 12-m, and you claim that there is only one m that would satisfy the equation 3x+7y = 12-m which is wrong. Can you please correct me because I'm guessing I have understood the problem.


My claim was that for each m between 0 and ab-a-b, only one of 3x + 7y = 11 - m and 3x + 7y = m will have a solution (sorry, I added a 1 for God knows what reason). Let me know if I've misunderstood something.

3x + 7y = 0 has a solution and 3x + 7y = 11 does not.
3x + 7y = 1 has no solution and 3x + 7y = 10 does.

etc.

3x + 7y = 5 has no solution and 3x + 7y = 6 does.
(edited 11 years ago)
Reply 8
Edit: Double post.
(edited 11 years ago)
Reply 9
What I meant to write was "[...]I'm guessing I have misunderstood the problem". But let's try to formalize it a bit:
Lemma: Let M={0,1,2,3...abab}M = \left\{0,1,2,3...ab-a-b\right\} and mM.m\in M. Then either
xa+yb=mxa+yb = m
or
xa+yb=ababmxa+yb = ab-a-b-m
holds true.
Proof: If xa+yb=mxa+yb = m lacks solutions, then GCD(a,m)=1GCD (a,m) = 1 and GCD(b,m)=1GCD (b,m) = 1. Therefore, GCD(ababm,m)=1GCD(ab-a-b-m,m) = 1. To see why, divide ab-a-b-m with m:
ababmm=abma+bm1\frac{ab-a-b-m}{m} = \frac{ab}{m} - {a+b}{m}-1
Obviously, GCD(ab,m)=1GCD(ab,m) = 1. Also, the following is NOT true:
Unparseable latex formula:

ab \equiv a+b \hspace{6} (mod\hspace{6} m)


This is because
a+b=ab(1a+1b)a+b = ab(\frac{1}{a}+\frac{1}{b})
and as we know GCD(a,b)=1GCD(a,b) =1. Therefore the above cannot be true and thus GCD(ababm,m)=1.GCD(ab-a-b-m,m)=1.

As GCD(ababm,m)=1GCD(ab-a-b-m,m)=1, there must be a c and d such that:
c(ababm)+dm=1.c(ab-a-b-m) + dm = 1.It follows that there exists a k for which
k(c(ababm)+dm)=ax+by.k(c(ab-a-b-m)+dm) = ax+by.This only goes for the the numbers m where there are no solutions for ax+by=m.
Reply 10
Ups, I'm pretty convinced my proof is false. I will try to formulate a new one (which should be simpler as well).

Quick Reply

Latest