which is the least number that must be subtracted from 1100 so that the remainder when divided by 7 , 12 , 16 is 4 ?
"first we need to figure out what numbers are exactly divisible by 7 , 12,16 . this will be the set { lcm , lcmx 2 , lcmx 3 , . . . } lcm ( 7 , 12,16 ) = 48 * 7 = 336 the numbers which will leave remainder 4 will be { 336 + 4 , 336 x 2 + 4 , 336 x 3 + 4 , . . . } the largest such number less than or equal to 1100 is 336 x 3 + 4 or 1012 to obtain this you need to subtract 88 d"
subtract(1100, add(4, multiply(gcd(1100, lcm(lcm(7, 12), 16)), lcm(lcm(7, 12), 16))))