What is the largest 7digit number that is divisible by 249, but not divisible by 5?
249 = 3 * 83 and is thus relatively prime to 5. Their product, and therefore LCM, is 1245.
9999999/1245 is 8032 with a remainder of 159.
1245 * 8032 = 9999840
Thus 9999840 is a multiple of both 249 and 5. Both adding and subtracting 249 to or from this number will produce a multiple of 249 that's not a multiple of 5. The addition would give a number with more than 7 digits, so the answer sought results from a subtraction of 249, being 9999591.

Posted by Charlie
on 20190708 14:39:41 