Re: nCr program - MCODE Message #29 Posted by Egan Ford on 28 Nov 2009, 3:04 p.m., in response to message #27 by Ángel Martin
Quote:
Maybe my intuition isn't what it should though...
This may or may not help. But...
Take, say, 7 consecutive integers. Now take the set of all integers. Since every 7th integer is divisible by 7, and every 6th by 6, etc..., then if you have 7 consecutive integers then somewhere you overlap with the sequence of one in every 7 numbers. Same for 6, 5, etc...
E.g. take the sequence:
29, 30, 31
Two prime numbers. Based on the argument above at least one of the three must be divisible by 2. Same for the number 3. In this case its 30 for both.
As you continue to multiply the next number in the sequence you can be certain that the product will be divisible by the number of elements in your sequence, e.g.:
29, 30, 31, 32
4 must divide one of them. 32 in this case.
29, 30, 31, 32, 33
5 must divide one of them. Again 30.
It gets interesting with the 6th number:
29, 30, 31, 32, 33, 34
6 must divide one of them. Again 30, but 30 is all used up with 2*3*5. No worries. 1 divides 29, 2 divides 32, 3 divides 33, 4 divides 32, 5 divides 30, 6 divides 30. As you continue to multiply numbers you gain more factors and once multiplied you lose any memory of what number provided what factor.
Edited: 28 Nov 2009, 3:23 p.m.
|