Problem 42888. Frobenius McNugget Factorization
Mr. Frobenius McNugget is a peculiar man.
As you might expect, he likes to eat Chicken McNuggets. But his love of number theory influences his appetite in strange ways. On any given day he wakes up with a desire for a specific number of McNuggets. If that number is 19, then no other number of McNuggets will do. But the McFastFood restaurant down the street serves McNuggets only in quantities of 6, 9, or 20 to a box. So he can be satisfied on a 21 nugget day, but on a 19 nugget day he must go hungry. To make matters more interesting, the restaurant often changes the quantities in their boxed McNuggets.
Given the box counts nuggets, what is the highest number frob for which Frobenius must go hungry? nuggets is a vector of positive integers with two or more elements.
Examples
nuggets = [2 5]
frob = 3
nuggets = [6 9 20]
frob = 43
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Peng Liu
on 6 Jun 2016
Got same results with Jan.
Peng Liu
on 7 Jun 2016
A nice place to check the results: http://mathsjavascript.free.fr/frobenius_9_page.html
Ned Gulley
on 7 Jun 2016
My apologies gentlemen! I rushed this into print yesterday afternoon. Thanks for the reference Peng. I have fixed the offending answers.
Solution Comments
Show commentsProblem Recent Solvers38
Suggested Problems
-
349 Solvers
-
1409 Solvers
-
Numbers with prime factors 2, 3 and 5.
579 Solvers
-
Create logical matrix with a specific row and column sums
313 Solvers
-
300 Solvers
More from this Author50
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!