GCD(12, 18)
GCD(15, 105)
GCD(84, 64)
LCM(1,2,3,4,5,6) # 60
LCM(2,3,5,7) == print(2*3*5*7) # true, of course
LCM(1:8) # 840
## the LCMs needed to get integer coefficients / N in Taylor polynomial for log(1+x):
vapply(1:24, function(n) LCM(1:n), 1)
Run the code above in your browser using DataLab