Recently, I learned that a conclusion of Lagrange's theorem is the following :
if $G$ is a finite group let $a \in G$ and $n\in \mathbb{N}$ if $a^n=e$ then $O(a)|n$
I might be missing out something but I don't understand how this theorem works.
For example let take $G=\mathbb{Z^∗_7}$, G cyclic since $7$ is a prime number.
and also $|G|=p-1=7-1=6$ lets take $2\in G$ we know that $2^6=e=1$, but for $n=11$ we get that $2^{11}=e$ but $6 \not| 11$ when $6=O(2)$.
Could somebody help me understand what I missing out, I can't figrue it out.
Thank you.
EDIT:
I don't know how I didn't notice that. Thank everybody!
You have correctly stated that if $a^n=e$ in a finite group $G$, then $\operatorname{ord}(a)\mid n$. For $a=2$ and $G=U(7)$ the first computation is correct, because $2^3=1$ in $G$ and $3\mid 6$. The second computation, however, is wrong, because $2^{11}=4$, and not $1$. Hence it is not surprising that the conclusion $3\mid 11$ is wrong, too. In fact, $2^{11}=2048\equiv 4\bmod 7$. Also note that $\operatorname{ord}(2)=3$, and not $6$.