I have an unlimited supply of 17-cent, 18-cent, and 19-cent stamps. I'd like to put exactly cents' worth of postage on an envelope, but no matter which combination of stamps I try, I am unable to accomplish this.
What is the largest possible value of ?
Bonus 1:
Generalize to any three consecutive integers.
Bonus 2:
Generalize to any three-term
arithmetic progression
.
Bonus 3:
Generalize to any arithmetic progression.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let's do Bonus 1. The number we're looking for is called the Frobenius number g ( n , n + 1 , n + 2 ) . The claim is that this number equals n ⌊ n / 2 ⌋ − 1 , so that for n = 1 7 the answer is 1 7 ⋅ 8 − 1 = 1 3 5 .
To prove this, note that it is possible to find a sequence of n representable numbers starting at n ⌊ n / 2 ⌋ , as follows. Each of the given 3-tuples ( a , b , c ) represents n ⋅ a + ( n + 1 ) ⋅ b + ( n + 2 ) ⋅ c . n ⌊ n / 2 ⌋ n ⌊ n / 2 ⌋ + 1 n ⌊ n / 2 ⌋ + 2 n ⌊ n / 2 ⌋ + 3 n ⌊ n / 2 ⌋ + n − 1 = ( ⌊ n / 2 ⌋ , 0 , 0 ) = ( ⌊ n / 2 ⌋ − 1 , 1 , 0 ) = ( ⌊ n / 2 ⌋ − 1 , 0 , 1 ) = ( ⌊ n / 2 ⌋ − 2 , 1 , 1 ) ⋮ = { ( 0 , 0 , ⌊ n / 2 ⌋ ) ( 0 , 1 , ⌊ n / 2 ⌋ − 1 ) if n is odd if n is even and so we can represent any number m larger than these by noting that m − n q is one of the numbers in this range, so we can represent m − n q and then add q to the first coordinate of the representation to get a representation for m .
So this shows that g ( n , n + 1 , n + 2 ) ≤ n ⌊ n / 2 ⌋ − 1 . The proof concludes by showing that n ⌊ n / 2 ⌋ − 1 is not representable. To see this, consider the equation modulo n . Note that n ⌊ n / 2 ⌋ − 1 is congruent to n − 1 mod n . And a number represented by a 3-tuple ( a , b , c ) is congruent to b + 2 c mod n . Also note that for a representation ( a , b , c ) of n ⌊ n / 2 ⌋ − 1 , we would have a + b + c < ⌊ n / 2 ⌋ . So b + 2 c is a nonnegative integer which is (because of this last restriction) ≤ 2 ( ⌊ n / 2 ⌋ − 1 ) . This is strictly smaller than n − 1 , so there is no way to represent a number that small which is congruent to n − 1 mod n .
(If this is confusing, it might help to consider the example n = 1 7 . The point is that 1 3 5 is one less than a multiple of 1 7 , and a representation ( a , b , c ) of 1 3 5 would have to have a + b + c < 8 , but there is no way to have b + 2 c = 1 6 if a + b + c < 8 ; the best we could do would be to take a = b = 0 and c = 7 which would give b + 2 c = 1 4 . )
For Bonus 2 and 3, there is a general formula that is proved in much the same way as the above. I leave the details to you. :) g ( n , n + d , … , n + s d ) = ( ⌊ s n − 2 ⌋ + 1 ) n + ( n − 1 ) ( d − 1 ) − 1 .