mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Math (https://www.mersenneforum.org/forumdisplay.php?f=8)

 wreck 2010-04-15 01:20

This week I meet a problem that can't be solved by myself totally, so here it is.

Let a, b be two positive integers, a<b.
Then what's the smallest number could be expressed as i*a+j*b, where i and j are integers, i>-1,j>-1.

For example, if a=3,b=4,then c=6,since 5 can not be expressed as i*3+j*4 and 6=2*3+0*4,7=1*3+1*4,8=0*3+2*4,9=3*3+0*4,etc.

And Then if a is an even number, b=a+1, it seems like c=a^2-a, but I don't know how to proof it. Another question is if a is an odd number and b=a+2,how to compute c and is there a simple formula to express c?

--Bo Chen--

 jyb 2010-04-15 05:01

[QUOTE=wreck;211810]This week I meet a problem that can't be solved by myself totally, so here it is.

Let a, b be two positive integers, a<b.
Then what's the smallest number could be expressed as i*a+j*b, where i and j are integers, i>-1,j>-1.

For example, if a=3,b=4,then c=6,since 5 can not be expressed as i*3+j*4 and 6=2*3+0*4,7=1*3+1*4,8=0*3+2*4,9=3*3+0*4,etc.

And Then if a is an even number, b=a+1, it seems like c=a^2-a, but I don't know how to proof it. Another question is if a is an odd number and b=a+2,how to compute c and is there a simple formula to express c?

--Bo Chen--[/QUOTE]

I think you need to revise your statement of the problem. The way you've posed it, I believe the answer is always i = j = 0 => c = 0.

 Zeta-Flux 2010-04-15 05:41

I think the problem is supposed to be: find the *largest* number which is *not* expressible in that form. This is often called the [URL="http://www.artofproblemsolving.com/Wiki/index.php/Chicken_McNugget_Theorem"]Chicken McNugget Theorem[/URL]

 wreck 2010-04-15 07:05

[QUOTE=jyb;211821]I think you need to revise your statement of the problem. The way you've posed it, I believe the answer is always i = j = 0 => c = 0.[/QUOTE]

I'm sorry, it is indeed that I only want to find the positive value of c and (a,b)=1 is the condition.

 wreck 2010-04-15 07:11

[QUOTE=Zeta-Flux;211826]I think the problem is supposed to be: find the *largest* number which is *not* expressible in that form. This is often called the [URL="http://www.artofproblemsolving.com/Wiki/index.php/Chicken_McNugget_Theorem"]Chicken McNugget Theorem[/URL][/QUOTE]

Oh, that is indeed what I want, so from the url what I want is c=ab-a-b+1.

Thanks very much.

 All times are UTC. The time now is 04:53.