Let x denote the greatest 4-digit number which when divided by 6, 7, 8, 9 and 10 leaves a remainder of 4, 5, 6, 7 and 8 respectively. Then, the sum of the four digits of x is
Show Hint
Notice remainder = divisor minus 2 in every case, so x + 2 is a common multiple of 6, 7, 8, 9, 10.
Another way to see this is to work directly with the largest possible 4-digit multiple of the LCM and step down from there.
Spot the pattern first: dividing by 6, 7, 8, 9, 10 leaves remainders 4, 5, 6, 7, 8. In every case, remainder = divisor minus 2, so $x+2$ is exactly divisible by each of 6, 7, 8, 9 and 10.
Compute the LCM: $6=2\times3$, $7=7$, $8=2^3$, $9=3^2$, $10=2\times5$, so $\text{LCM}=2^3\times3^2\times5\times7=2520$.
Locate the largest 4-digit multiple of 2520: multiples of 2520 are 2520, 5040, 7560, 10080. Since we need $x+2 \le 9999$, the largest usable multiple is 7560 (10080 exceeds the 4-digit range).
Back out x: $x = 7560 - 2 = 7558$, which is indeed a 4-digit number, so it is the greatest such x.