It is traditional to make certain things come out in roman rather than italic. This includes $ \sin(x) $ rather than $ sin(x) $, $ \gcd(3,4) $ instead of $ gcd(3,4) $, as well as $ \tan,\arctan,\log, $ and others.
The lcm is one of those too, but seems not to be coded in this version of latex. The usual command would be\lcmbut that does not work here. Instead, one can do it like this: $ \text{lcm} $