➡ Chicken nuggets are cool, so is maths, and so are you.

Part 1: What is up with chicken nuggets?

Calling something as simple and beautiful as chicken nuggets a problem is strange, I admit. Even if it’s just mathematical.

But these golden bits of pure joy hold (better, are held by) something not as joyful, if you think about it for long enough.

Or even more joyful, if you are into those kind of things.

(Package) Size matters

If your hunger for chicken nuggets has ever led you to a McDonalds in Germany (i assume other countries as well, i only checked a few), you are prompted to choose between packages containing 6, 9 or 20 nuggets.

I don’t know the reason for those numbers, especially since there are 4-packs (at least in some other countries) and occasional promo offers with 11 nuggs per package. But for now, let’s assume 6,9 and 20 to be the standard packaging sizes.

If you want to enjoy your nuggs in peace, i strongly suggest to stop reading now. It’s all downhill from here.

So, why are those sizes a problem and where does math come into play?

TL;DR: there are some amounts of nuggets you cannot order with only these three serving sizes.
These are, of course, all numbers below six (since 6 is the smallest package) and a few more numbers which are not divisible by 6, 9, 20 or any combination of those three numbers. Most of them are prime numbers, but I’ll let you figure this out for your own. Eleven, for example, is one of those numbers. Every number after 43, which is the highest of those numbers, is possibly order-able with at least one combination of these package sizes.

This phenomenon is fairly old, being known as The Coin Problem after Ferdinand Frobenius. These numbers are even named after him, being called Frobenius numbers.

Here’s your trivial knowledge for today.

But since I wanted to get started with learning some web development, I thought “I shalt programme an app, lest i be damned”.

Everybody recommends programming a calculator to get started, so why not use it for The Greater Good (which, in this and every other case, is Nuggets)?

This aforementioned app is currently under construction. When i publish this post, the calculation part is a huge mess that needs some serious improvement.
But, nevertheless, you can try it out already!

Part 2: It all starts with hunger

Let’s assume you would like to have 60 nuggets. You could either order 10 packages of six each or 3 packages of 20 nuggets. Or, if you don’t mind eating 3 more, you could get 63 nuggets by ordering 7 packages with nine nuggs.

10 x 6 = 60 3 x 20 = 60 7 x 9 = 63 (close enough)

So, how do you decide which way you order them?

This question is not just about the pure amount of chicken nuggets. There are other factors at play, such as the price and the amount of dips you will get with your order. Based on this assumption, i wanted the nugget calculator to give you an overview of options that can help you decide which way to place your order.

I decided on four different suggestions:


Exact: Return the exact amount. If the entered amount is a Frobenius number (F), return the order for the next higher non-F number

Easy: Return the way with least ordering effort. In the above example, this would be 3 x 20, because you would only need 3 packages instead of e.g. 10, if you ordered the same amount with packages containing 6 nuggs each.

Cheap: Return the cheapest way to order, even if the number does not exactly match.

Dips: Return the order with the most dips. Keep on reading for details.


Since there are varying prices between the package sizes (for packaging material, labor costs, …), the price per nugget varies. So does the amount of dips you get with each ordered package.
Package Package Price (€) Price per Nugget (€) Dips Nuggets per Dip
6 2,99 0,50 1 6
9 3,99 0,44 2 4,5
20 7,99 0,40 3 6,6

This diagram with prices and amounts of dips from my area shows that for ordering as many dips as possible, packs of nine are the best way to go. If you want to stay cheap, your best choice is buying 20s.
Know your nuggs is all i’m saying.

That’s as far as it goes with static prices and dips. However, if those variables change, the result may vary in favor of another package size.
And that’s exactly where i’m stuck right now codewise. I’ll be back after reading into this some more.