This is a beauty of a puzzle sent by Suman Saraf – thanks Suman!
A fast food restaurant sells dimsums in boxes of 7 and 3. What’s the greatest number of dimsums a person cannot buy. Generalize it for p and q where p and q are relatively prime.
As always, please send your answers as comments within the blog (preferred), or send an e-mail to alokgoyal_2001@yahoo.com. Please do share the puzzle with others if you like, and please also send puzzles that you have come across that you think I can share in this blog.
Happy eating!
For 7 and 3, answer is 11
I know I don’t have the perfect answer but articulating incomplete approach:
For any p and q where p and q are relatively prime, the number is n such that n is not doable, and n+1, n+2.., n+q-1 is doable, and n+q is also doable.
n+q is doable but n is not doable implies n+q is doable without q.
So n+q is a multiple of p
n=2p-q
11 is the answer for first part.