Stephanie M. answered 04/23/15
Tutor
5.0
(961)
Degree in Math with 5+ Years of Tutoring Experience
Actually, there is a non-infinite answer. You'd be surprised to find that any large number you picked could be hit when buying items at the store. I'll take a random one... 166. We can figure out how to hit it with store items by subtracting 17 from the number until we get to a multiple of 6:
166 - 17 = 149 - 17 = 132, which is 6×22.
So, you could buy 22 $6 items and 2 $17 items. You could also test whether you can hit a given number by subtracting 6 from it until you got a multiple of 17, but I think it's easier to recognize multiples of 6 than multiples of 17.
Let's think a little more about what's happening when we subtract 17 from a number to try to find a multiple of 6. Multiples of 6 occur (by definition) every six numbers. But so do numbers one less than a multiple of 6, numbers two less than a multiple of 6, etc.
..., 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, ...
If we took a number one less than a multiple of 6 (say 23) and subtracted 17, we'd always get a multiple of 6 (in this case, 12). That's because 17 is exactly one less than a multiple of 6. Subtracting 17 is like subtracting 6, then 6 again, then 5. It changes your number's position relative to multiples of 6 by one. If we took a number two less than a multiple of 6 (say 34) and subtracted 17, we'd always get a number one less than a multiple of 6 (in this case, 17). Do it again, and you're guaranteed to get a multiple of 6 (in this case, 0).
This works all the way up to numbers five less than a multiple of 6. Subtract 17 to get a number four less than a multiple of 6, then a second time to get a number three less than a multiple of 6, then a third time to get a number two less than a multiple of 6, then a fourth time to get a number one less than a multiple of 6, then a fifth time to get a multiple of 6.
Numbers six less than a multiple of 6 are multiples of 6 themselves, so the cycle starts over again with them. The most you'll ever have to subtract 17 before running into a multiple of 6, given any number, is five times. So, any number you can subtract 17 from at least five times is guaranteed to be hittable by items at the store. That means you can hit any number greater than or equal to 17×5 = 85.
Here's the cyclical pattern at work:
103 - 17 = 86 - 17 = 69 - 17 = 52 - 17 = 35 - 17 = 18
102
101 - 17 = 84
100 - 17 = 83 - 17 = 66
99 - 17 = 82 - 17 = 65 - 17 = 48
98 - 17 = 81 - 17 = 64 - 17 = 47 - 17 = 30
97 - 17 = 80 - 17 = 63 - 17 = 46 - 17 = 29 - 17 = 12
96
95 - 17 = 78
94 - 17 = 77 - 17 = 60
93 - 17 = 76 - 17 = 59 - 17 = 42
92 - 17 = 75 - 17 = 58 - 17 = 41 - 17 = 24
91 - 17 = 74 - 17 = 57 - 17 = 40 - 17 = 23 - 17 = 6
90
89 - 17 = 72
88 - 17 = 71 - 17 = 54
87 - 17 = 70 - 17 = 53 - 17 = 36
86 - 17 = 69 - 17 = 52 - 17 = 35 - 17 = 18
85 - 17 = 68 - 17 = 51 - 17 = 34 - 17 = 17 - 17 = 0
Now all that remains is to find the first number lower than 85 that can't be hit by the items at the store. Let's continue the pattern...
84
83 - 17 = 66
82 - 17 = 65 - 17 = 48
81 - 17 = 64 - 17 = 47 - 17 = 30
80 - 17 = 63 - 17 = 46 - 17 = 29 - 17 = 12
79 - 17 = 62 - 17 = 45 - 17 = 28 - 17 = 11...
Most of these numbers work fine. Even though you can't subtract five 17s from 81, for example, it doesn't matter because it's only three less than a multiple of 6. You only need three 17s, so you could buy 3 $17 items and 5 $6 items for a total of $81.
However, 79 is five less than a multiple of 6, but you can't subtract five 17s from it. That means you'll never hit a multiple of 6. In other words, no matter how you combine 6 and 17, you can't ever hit 79. 79 is the biggest number you cannot get when buying items at this store.
Hope this makes sense!