Can someone explain this conclusion for Finite State Machines?
In both cases, the number of states is the LCM. This is because a number is divisible by $m$ and&nbsp;$n$ if, and only if, it is divisible by $\mathrm{lcm}(m,n)$ and, for any positive integer&nbsp;$d$, you can check that the input length is divisible by&nbsp;$d$ by having states $\{0, \dots, d-1\}$ such that the automaton is in state&nbsp;$i$ when the number of characters read is congruent to&nbsp;$i$, modulo&nbsp;$d$.