looping through possible combinations of McNuggets packs of 6, 9 and 20
ian.g.kelly at gmail.com
Mon Aug 16 17:42:25 CEST 2010
On Mon, Aug 16, 2010 at 11:04 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries <downaold at gmail.com> wrote:
>>> I suspect that there exists a largest unpurchasable quantity iff at
>>> least two of the pack quantities are relatively prime, but I have made
>>> no attempt to prove this.
>> That for sure is not correct; packs of 2, 4 and 7 do have a largest
>> unpurchasable quantity.
> 2 and 7 are relatively prime, so this example fits my hypothesis.
Although now that I think about it some more, there are
counter-examples. For example, the pack sizes (6, 10, 15) have a
largest unpurchasable quantity of 29, but no two of those are
I'm going to revise my hypothesis to state that a largest
unpurchasable quantity exists iff some there exists some relatively
prime subset of the pack sizes of cardinality 2 or greater.
More information about the Python-list