this is my first time posting so if I make mistakes, I'm very sorry. For my homework in abstract algebra I was asked to basically calculate the order of elements $a$ and $b$, and then the order of $a+b$ in $\mathbb{Z}_{12}$. After doing the homework, I got curious about patterns in this, and noticed that $$Q\equiv\frac{\operatorname{lcm}(|a|,|b|)}{|a+b|}\in\mathbb{N}$$ Basically, not only is it a whole number, it seems to always divide the order of the group, so if we are in $\mathbb{Z}_n$, then $Q$ divides $n$. I'm not sure why this is. I got more curious and decided to make a heat map of all of the values of $Q$ for any combination of elements $a$ and $b$ in the group. I let the order be $144$, and this is what I got: Q144
In this, black is equivalent to 1, the lowest number. The higher the value, the hotter. White is equal to the order of the group. It's worth noting that this is very composite, so I wondered what happened when the order was prime, and here's what I got for order 53: Q53
Very strange patterns I'm seeing, any ideas why this is? I don't know much about group theory (since I'm taking a class in it), so any insight would be much appreciated :)
For any $a,b \in \mathbb{Z}_n$, consider $(a,b)$, the subgroup generated by $a$ and $b$. This group is precisely all elements of the form $ka+lb$ (mod n).
Recall that if $G$ is a finite group and $H \subset G$ is a subgroup, $|H|$ divides $|G|$. I leave it as an exercise for you to show that $|(a,b)| =$ lcm$(|a|,|b|)$. Hence lcm$(|a|,|b|)$ divides n. Furthermore, since $a+b \in (a,b)$, $|a+b|$ divides $|(a,b)|$. So the end result is that $\frac{\text{lcm}(|a|,|b|)}{|a+b|}$ will always be an integer factor of n.