6 - 4 = 2, 7 - 5 = 2, 8 - 6 = 2, 9 - 7 = 2, 10 -8 = 2
L.C.M. of 6, 7, 8, 9, 10 = 2520;
Greatest number of 6 digits = 999999
2520 x 396 + 2079 = 999999
Remainder = 2079.
Subtract 2079 from 999999, then we get 999999- 2079 = 997920.
Subtract 2 from this number to get required number, which is 997918 and which will give the remainders 4, 5, 6, 7, 8 when divided by 5, 6, 7, 8, 9 respectively.