The Postman and His Two Stamps
A small post office has run out of everything except stamps of two values: 4 cents and 7 cents. There is an unlimited supply of each, and any number of stamps can be combined on a letter, as long as they add up to exactly the amount required (no change and no refunds).
Some amounts can be made, such as 11 (4 + 7) or 14 (7 + 7), and others cannot, such as 5 or 6. But beyond a certain amount, every value turns out to be possible.
What is the largest amount in cents that can NOT be made exactly with stamps of 4 and 7?
See solution
The answer is 17 cents.
The amounts 18 (4 + 7 + 7), 19 (4 + 4 + 4 + 7), 20 (five 4-cent stamps) and 21 (three 7-cent stamps) can all be made. Since these are four consecutive amounts, and adding one 4-cent stamp takes each to the amount 4 higher, every amount from 18 onward can be made.
And 17 is impossible: using 0, 1 or 2 stamps of 7 (three would already give 21, too much), the remaining 17, 10 or 3 cents would have to be covered by 4-cent stamps, and none of those numbers is a multiple of 4. Hence 17 is the largest amount that cannot be made.