On Mon, Aug 16, 2010 at 11:04 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries <downa...@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 relatively prime. 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. Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list