All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Missions impossible (Posted on 2014-11-17) Difficulty: 3 of 5
A certain chain store sells chocolate bars in packets of 17 and 9 only. Clearly, you could not get 8 or 25 bars. Find all quantities of bars that you cannot buy.

Generalize for m and n, mutually prime integers, m>n.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Start of a General Solution | Comment 2 of 3 |
Let a1,a2, be the set of possible reminders of m.

Let's take ai. from the chinese reminder theory we have that there exists an x such that x=n*T, x = ai (m).
Now, for any x'>x such that x'=ai (m), we have x'=x+m*Z and
x'=n*T+m*Z. Thus x' is a quantity than can be bought.

However, as x is the minimum to fulfil the above requirement, we have that for any x''<x, x=ai(m) - x'' can not be bought.

Iterating over a1,a2, we aggregate these x'' and get the set of numbers that can not be bought.

  Posted by Omri on 2014-11-25 08:00:32
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information