This is probably a very obvious bit of group theory for anyone who's actually studied it, I'm a theoretical physics student writing my masters project on Shor's algorithm and this seems to be a necessary but not solely sufficient way of quickly finding members of groups under multiplication modulo N.
I'm wondering if it is just a coincidence that the groups I've tested this on seem to fit this description, or at least that the order of the group is the same as the number of co primes to N (less than N).
If this is true and not just a coincidence, could anyone enlighten me on the deeper significance of this? I have a line in my project where I'm deriving Fermat's little theorem, I write:
"To derive Fermat's little theorem we simply state that under multiplication modulo P (with P being a prime number), that no numbers below P share a common factor with P and that means that all P-1 numbers less than P are co-prime to P and thus, all are inside G_P."
Is this statement true? And is it also true for composite modulo's?
Thank you for any help!
For every integer $N$, the elements that are invetible mod $N$ are exactly those which are prime to $N$. This is an easy application of Bézout relation. Next, the group $(\mathbb{Z}/N\mathbb{Z})^{*}$ of invertible elements mod $N$ is isomorphic to the product over primes dividing $N$ of $(\mathbb{Z}/p^\alpha\mathbb{Z})^{*}$ where $\alpha$ is the maximal power such that $p^\alpha$ divides $N$. One can show that $|(\mathbb{Z}/p^\alpha\mathbb{Z})^{*}|=p^\alpha-p^{\alpha-1}$, and hence $$|(\mathbb{Z}/N\mathbb{Z})^{*}|=\prod_{p\backslash N}(p^\alpha-p^{\alpha-1})=\phi(N).$$ The function $\phi$ is called Euler's totient function in the litterature.