The Chicken Nugget Theorem, AKA the Postage Stamp Problem, states that for any two relatively prime positive integers \(m,n\), the greatest integer that cannot be written in the form \(am + bn\) for nonnegative integers \(a, b\) is \(\ mn-m-n\). (AoPS definition).
So, let's say you worked at a shop that sold cookies in packets of \(13\) and \(9\). What would be the largest number of cookies that you couldn't buy?
\(m = 13\)
\(n = 9\)
\((13 \times 9) - 13 - 9\)
\(=117 - 13 - 9\)
Ans: \(95\) cookies.
A long time ago, in a galaxy far, far away...
McDonalds had sold Chicken McNuggets in packets of \(9\) and \(20\). Some wise person wondered what was the largest number of chicken nuggets that one couldn't buy. Later, the answer was found to be \(151\) McNuggets. And thus, the Chicken McNugget Theorem had been formed.