When I use beamer, things like \sin, \cos, etc. appear in the sans-serif font. But if I say
\DeclareMathOperator{\lcm}{lcm}
and then use \lcm inside a math formula, it appears in the cmr font. How can I get it to appear in the sans-serif font like other math functions?

