Computer scientist here looking at a question that came about from in-place matrix transposition, but rusty on my abstract algebra and number theory...

Suppose we have the multiplicative group $\mathbb{Z}/n\mathbb{Z}$ and some $k$ which divides $n + 1$, with $k > 1, n > 2$. If we look at the multiplication of $k$ against elements of $\mathbb{Z}/n\mathbb{Z}$, they will fall into cycles.

For example, if $k = 1$, then we will obviously get $n$ distinct cycles. For a non-trivial example, consider $\mathbb{Z}/11\mathbb{Z}$ and let $k = 4$. The cycles generated here are $\{0\}$, $\{1, 4, 5, 9, 3\}$, and $\{2, 8, 10, 7, 6\}$.

Two questions arise: Can we say anything about the number of cycles under this action? Given some element $m$ in $\mathbb{Z}/n\mathbb{Z}$, is there an efficient way to tell what cycle $m$ belongs to?

Thanks!

set$\mathbb{Z}/n\mathbb{Z}$ with the action given by multiplication by an invertible element $k$ modulo $n$. $\endgroup$ – Tom De Medts Sep 27 '19 at 9:57