which is the least number that must be subtracted from 1828 so that the remainder when divided by 8 , 12 , 16 is 4 ?
"first we need to figure out what numbers are exactly divisible by 8 , 12,16 . this will be the set { lcm , lcmx 2 , lcmx 3 , . . . } lcm ( 8 , 12,16 ) = 48 = 48 number is to be subtracted is 0 the largest such number less than or equal to 1828 is 48 * 38 + 4 a"
subtract(1828, add(4, multiply(gcd(1828, lcm(lcm(8, 12), 16)), lcm(lcm(8, 12), 16))))