A divisibility puzzle
Found an interesting puzzle while exploring Hari’s blog
As the puzzle is very small, republishing it here. Here it goes..
Find a number x when divided by n leaves a reminder n-1, where n ranges from 1 to 10.
I just tried to do something with the basic rules of divisibility for a few minutes before the programmer in me woke up and said “Do you really want to solve the problem? You can get the solution in no time”. Python was ready to swallow the mathematician in me ![]()
ab = range(1, 15000) for i in range(10, 1, -1): ab=[x for x in ab if((x%i)==(i-1))] print ab
Solution set: [ 2519, 5039, 7559, 10079, 12599, ... ]
The interesting fact is that the difference between any two elements in the solution set is a multiple of 2520 which is the smallest natural number divisible by all numbers from 2 to 10. Subtracting 1 from 2520 makes it indivisible by every number from 2 to 10. Wow! Having found out the solution, now I back track to solve the problem. Any mathematicians out there? Please help me solve it mathematically using the rules of divisibility
Edit: Fay has given good explanation to solve this problem. See the comments.
People Say