McNugget Theorem? Nah!

McNuggets come in boxes of 7, 13, and 19. What is the largest amount of McNuggets that the customer cannot exactly obtain?


The answer is 50.

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.

4 solutions

Let's define S S' as the complement of S S ; in other words S S' contains all the possible quantities of McNuggets that you can buy. Now let's define S ( n ) S'(n) , a subset of S S' , as all possible quantities of McNuggets that you can buy given that you buy precisely n n boxes of McNuggets. The elements of the first few subsets ( S ( n ) S’(n) ) are listed below:

  • S ( 1 ) S'(1) = {7,13,19}

  • S ( 2 ) S'(2) = {14,20,26,32,38}

  • S ( 3 ) S'(3) = {21,27,33,39,45,51,57}

Notice that all of the elements of S ( 1 ) S'(1) are congruent to 1 (mod 6), all the elements of S ( 2 ) S'(2) are congruent to 2 (mod 6), and all the elements of S ( 3 ) S'(3) are congruent to 3 (mod 6). In fact, in general the elements of S ( n ) S’(n) are congruent to n n (mod 6).

Now for the fun part: suppose you wanted to test and see if a customer can buy precisely 37 McNuggets. Note that the sets S ( 1 ) S’(1) and S ( 7 ) S’(7) are both congruent to 1 (mod 6), while the sets S ( 2 ) S’(2) , S ( 3 ) S’(3) ,... S ( 6 ) S’(6) , are not congruent to 1 (mod 6). The highest element of S ( 1 ) S’(1) is 19, while the lowest element of S ( 7 ) S’(7) is 49, so since 37 is greater than every element in S ( 1 ) S'(1) but less than every element in S ( 7 ) S'(7) , 37 must be a member of the union of the sets S ( 2 ) S’(2) , S ( 3 ) S’(3) ,... S ( 6 ) S’(6) in order to be a member of S S' . But 37 mod 6 = 1, so 37 cannot possibly a member of the aforementioned union of sets. Therefore the customer cannot buy exactly 37 McNuggets!

The example above illustrates the inspiration behind the following theorem, which can be used to solve the problem: Let x x be a natural number. x x is an element of S S iff there exists a natural number n n , congruent to x x (mod 6), such that 19 ( n 6 ) < x < 7 n 19(n - 6) < x < 7n .

(Note: The full proof of this theorem is a little bit long to add to this solution. I will post the proof as a note tomorrow and insert the link to the note here.)

So let's see the theorem in action using n = 8: The inequality for x x will be 38 < x < 56 38 < x < 56 . We are looking for values of x x that are congruent to 8 (mod 6), and it turns out we find two: 44 and 50. Since n = 8 is a value of n that satisfies the theorem for both 44 and 50, both numbers are elements of S S .

Now let’s try n = 9: The inequality for x x will be 57 < x < 63 57 < x < 63 . We are looking for values of x x that are congruent to 9 (mod 6), but it turns out that we can’t find any! What about n = 10? The inequality for x x will be 76 < x < 70 76 < x < 70 , which is of course a ridiculous contradiction. The same can be said for any n > 10. Thus we can’t find any more elements of S S for n > 8, and since any additional elements of S S greater than 50 can only be found with n > 8, this means that there simply aren't any. Therefore the largest element in S S , or the largest number of McNuggets that a customer cannot buy, is 50 \boxed {50}

Great Solution! Can you prove the claim that "in general the elements of S ( n ) S'(n) are congruent to n n (mod 6)" ? And is it just a special case or can it be generalised to numbers other than 7,13,19?

Roberto Nicolaides - 6 years, 2 months ago
Patrick Corn
Mar 18, 2015

It's enough to show that 50 S 50 \notin S and that 51 , 52 , , 57 S 51, 52, \ldots, 57 \in S , because we can get any larger element in S by adding the appropriate multiple of 7 7 to the solution for one of 51 , , 57 51, \ldots, 57 .

The representations of 51 51 through 57 57 are trivial to find, and then looking mod 7 7 at 7 a + 13 b + 19 c = 50 7a + 13b + 19c = 50 yields that b + 2 c 6 b+2c \equiv 6 mod 7 7 , so either b 6 b \ge 6 or c 3 c \ge 3 , which gives a left-hand side that is too large, so 50 S 50 \notin S .

Pi Han Goh
Mar 14, 2015

Arithmetic Progression case for Coin Problem with a = 7 , d = 6 , s = 2 a = 7, d = 6, s = 2

Which gives the answer a ( a 2 s + 1 ) + ( d 1 ) ( a 1 ) 1 = 50 a \left ( \left \lfloor \frac {a-2}{s} \right \rfloor + 1 \right ) + (d-1)(a-1) - 1 = \boxed{50}

Well if that doesn't make this problem trivial...

Oh well, there is at least one way of doing this problem without knowing the Frobenius number theorem. Those who don't know the theorem should have lot's of fun :)

Alexander Suarez-Beard - 6 years, 3 months ago

Log in to reply

Similar to Agnishom Chattopadhyay's solution here

With patience, Generating function:

1 ( 1 x 7 ) ( 1 x 13 ) ( 1 x 19 ) = 1 + x 7 + x 13 + x 14 + x 19 + x 20 + x 21 + 2 x 26 + x 27 + x 28 + x 32 + 2 x 33 + x 34 + x 35 + x 38 + 2 x 39 + 2 x 40 + x 41 + x 42 + 2 x 45 + 2 x 46 + 2 x 47 + x 48 + x 49 + x 51 + 3 x 52 + 2 x 53 + 2 x 54 + x 55 + sum of all powers of ( x 56 ) \begin{aligned} \frac {1}{(1-x^7)(1-x^{13})(1-x^{19})} & = & 1+x^7+x^{13}+x^{14}+x^{19}+x^{20}+x^{21} \\ & \ & + 2 x^{26}+x^{27}+x^{28}+x^{32}+2 x^{33}+x^{34} \\ & \ & +x^{35}+x^{38}+2 x^{39}+2 x^{40}+x^{41}+x^{42} \\ & \ & +2 x^{45} +2 x^{46}+2 x^{47}+x^{48}+x^{49} \\ & \ & +x^{51} +3 x^{52}+2 x^{53}+2 x^{54}+x^{55} \\ & \ & + \text{ sum of all powers of } (x \geq 56) \\ \end{aligned}

It appears that all powers of 51 51 and higher are possible, so answer is 50 \boxed{50}


Alternatively, one could work backwards from a two case problem, if it's only two numbers: 7 7 and 13 13 , then the number we're looking for is 7 × 13 7 13 = 71 7 \times 13 - 7 - 13 = 71 . So we just need to work backwards from 71 71

71 = 0 6 + 4 13 + 1 19 70 = 10 7 + 0 13 + 0 19 69 = 8 7 + 1 13 + 0 19 68 = 7 7 + 0 13 + 1 19 67 = 4 7 + 3 13 + 0 19 66 = 4 7 + 0 13 + 2 19 65 = 0 7 + 5 13 + 0 19 64 = 0 7 + 2 13 + 2 19 63 = 9 7 + 0 13 + 0 19 62 = 7 7 + 1 13 + 0 19 61 = 6 7 + 1 13 + 1 19 60 = 3 7 + 3 13 + 0 19 59 = 2 7 + 2 13 + 1 19 58 = 0 7 + 3 13 + 1 19 57 = 0 7 + 0 13 + 3 19 56 = 8 7 + 0 13 + 0 19 55 = 6 7 + 1 13 + 0 19 54 = 5 7 + 0 13 + 1 19 53 = 3 7 + 1 13 + 1 19 52 = 1 7 + 2 13 + 1 19 51 = 0 7 + 1 13 + 2 19 \begin{aligned} 71 = 0 \cdot 6 + 4 \cdot 13 + 1 \cdot 19 \\ 70 = 10 \cdot 7 + 0 \cdot 13 + 0 \cdot 19 \\ 69 = 8 \cdot 7 + 1 \cdot 13 + 0 \cdot 19 \\ 68 = 7 \cdot 7 + 0 \cdot 13 + 1 \cdot 19 \\ 67 = 4 \cdot 7 + 3 \cdot 13 + 0 \cdot 19 \\ 66 = 4 \cdot 7 + 0 \cdot 13 + 2 \cdot 19 \\ 65 = 0 \cdot 7 + 5 \cdot 13 + 0 \cdot 19 \\ 64 = 0 \cdot 7 + 2 \cdot 13 + 2 \cdot 19 \\ 63 = 9 \cdot 7 + 0 \cdot 13 + 0 \cdot 19 \\ 62 = 7 \cdot 7 + 1 \cdot 13 + 0 \cdot 19 \\ 61 = 6 \cdot 7 + 1 \cdot 13 + 1 \cdot 19 \\ 60 = 3 \cdot 7 + 3 \cdot 13 + 0 \cdot 19 \\ 59 = 2 \cdot 7 + 2 \cdot 13 + 1 \cdot 19 \\ 58 = 0 \cdot 7 + 3 \cdot 13 + 1 \cdot 19 \\ 57 = 0 \cdot 7 + 0 \cdot 13 + 3 \cdot 19 \\ 56 = 8 \cdot 7 + 0 \cdot 13 + 0 \cdot 19 \\ 55 = 6 \cdot 7 + 1 \cdot 13 + 0 \cdot 19 \\ 54 = 5 \cdot 7 + 0 \cdot 13 + 1 \cdot 19 \\ 53 = 3 \cdot 7 + 1 \cdot 13 + 1 \cdot 19 \\ 52 = 1 \cdot 7 + 2 \cdot 13 + 1 \cdot 19 \\ 51 = 0 \cdot 7 + 1 \cdot 13 + 2 \cdot 19 \\ \end{aligned}

Exhaust all possible ways for 51 = 7 a + 13 b + 19 c 51 = 7a + 13b + 19c with integers 0 a 7 , 0 b 3 , 0 c 2 0 \leq a \leq 7, 0 \leq b \leq 3 , 0 \leq c \leq 2 , we will see that there's no solution, which we can draw the same conclusion.

Pi Han Goh - 6 years, 3 months ago
Santanu Banerjee
Mar 24, 2015

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...