Divide 1000 by each integer from 1 to 1000 and record their remainders.
Among the 1000 remainders recorded, what number do you see most frequently?
Divide 1000 by each integer from 1 to 1000 and record their remainders.
Among the 1000 remainders recorded, what number do you see most frequently?
On
If you prefer a brute force computational method the following C code will yield an answer of 10.
int main(int argc, char *argv) { // array to keep track of the number of each divisor present int divisor[1001] = {0};
/* counts how many of each divisor there are */ for(int i = 1; i <= 1000; i++) { divisor[1000%i] = divisor[1000%i] + 1; }
int max = 0; int maxdivisor = 0;
/* finds most abundant divisor */ for(int i = 0; i <= 1000; i++) { if(b[i] > max) { max = divisor[i]; maxdivisor = i; } }
printf("%d",maxdivisor);
return 0; }
Same experiment for 5041. Guess why. $5040 = 7! = 2^4 \cdot 3^2 \cdot 5 \cdot 7 \; . $
Let's see, a divisor $n$ of $990$ gives a remainder of $10$ as long as $n$ itself is larger than 10. $$ 990 = 2 \cdot 3^2 \cdot 5 \cdot 11 $$ has 24 divisors, of which 7 are no larger than 10: 1,2,3,5,6,9,10. Then 24 - 7 = 17.
For comparison, 1000 has 16 divisors, so the remainder $0$ occurs 16 times.