$m$ takes values from 1 to an even number $M$ and $k = M/2$. This expression ${(m+k-1 \text{ mod } k) + 1}$ gives the repeated sequence of numbers from 1 to k. How can I further simply the expression to give the same repeated sequence?
For example M = 24 the expression gives the sequence
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12