which is the least number that must be subtracted from 1856 so that the remainder when divided by 7 , 12 , 16 is 6 ?
"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 6 will be { 336 + 6 , 336 x 2 + 6 , 336 x 3 + 6 , . . . } the largest such number less than or equal to 1856 is 336 x 5 + 6 or 1686 to obtain this you need to subtract 170 . c"
subtract(1856, add(6, multiply(gcd(1856, lcm(lcm(7, 12), 16)), lcm(lcm(7, 12), 16))))