3

I apologize because probably this is trivial, but I do not understand the concept:

"maximum order elements to mod n for n".

This is the context: in the Wikipedia in the primitive roots modulo n page there is a table in the section "Table of primitive roots" (link) saying:

"The following is a list about maximum order elements to mod n for $n \le 36$,

And then the table also explains:

"maximum order elements to mod n (for ns with "*", the maximum order of n does not equal to the Euler totient function of n, so there are no primitive roots mod n, for other ns, they are primitive roots mod n)

Basically, I would like to understand the definition and how to calculate the maximum order elements to mod n for those numbers n that do not have primitive roots mod n.

For instance, according to the explanation in the Wikipedia, for $n=8$ the maximum order element to mod 8 are $\{3,5,7\}$, and $n=8$ does not have primitive roots modulo 8, but I do not understand how they are calculated.

UPDATE As far as I can see, it would be as follows, but if somebody could confirm this, it would be very appreciated, because I do not see it clearly:

For instance:

$3^1 = 3 \equiv 3 \pmod8$

$3^2 = 9 \equiv 1 \pmod8$

$3^3 = 27 \equiv 3 \pmod8$

$3^4 = 81 \equiv 1 \pmod8$

$3^5 = 243 \equiv 3 \pmod8$

$3^6 = 729 \equiv 1 \pmod8$

$3^7 = 2187 \equiv 3 \pmod8$

So in this case the length of the cycle of the mods is 2 (only 1,3 and the again 1,3, etc.) and that is smaller than the totien function $\varphi(8)=4 \gt 2$ so 3 is not a primitive root modulo 8. Is this correct?

If it is correct then the only way to calculate the "maximum order elements to mod n" for a number n without primitive roots modulo n is as above, making all the possible exponents and deciding according to the results. Is that right?

Thank you!

UPDATE: the explanation in the answers worked like a charm, here is the Python code (very brute force but works, be aware that the variable "value" is the value for n):

from gmpy2 import gcd
def first_max_order_elem_mod_n(value): 
    lo = []
    for i in range (1,value):
        if gcd(value,i)==1:
            myexp = 1
            while ((i**myexp)%value)!=1:
                myexp = myexp + 1
            lo.append([i,myexp])

    bigger = 0
    current_pos = 0
    for k in lo:
        if k[1]>bigger:
            current_pos = k[0]
            bigger = k[1]
    return current_pos
iadvd
  • 8,875

2 Answers2

1

I think the important results are that the multiplicative group of $\mathbb Z_{p^{\alpha}}$ is $\mathbb Z_{p^{\alpha-1}}$ unless $p^{\alpha}$ is a power of $2$ larger than $4$ in this case the multiplicative group is $\mathbb Z_2 \times\mathbb Z_{p^{\alpha-2}}$.

In any case once you have this result, which can be proven using lifting the exponent lemma you can arrive to the following result using the chinese remainder theorem:

The multiplicative group of $n=p_1^{\alpha_1}p_2^{\alpha_2}\dots p_n^{\alpha_n}$ is equal to the direct product of the multiplicative groups of each of the prime powers.

From here you can see that the largest possible order an element can have is equal to the least common multiple of the orders of the cyclic groups that compose that direct product.

Calculating the elements of maximum order for $\mathbb Z_{2^n}$ with $n\geq 2$ is simple because $5$ and $-5$ are two generators for each of the two halves of the group.

However calculating the elements of maximum order of some groups can be messy. For example suppose we want to calculate the elements of maximum order of $\mathbb Z_{7\cdot19}$ The group of $\mathbb Z_{21}$ is $\mathbb Z_6\times \mathbb Z_18$ but if for example we take an element that is a generator $\bmod 19$ then this element is going to be of maximum order no matter what its congruence $\bmod 7$ is. So it is very messy in general.

Asinomás
  • 105,651
  • thank you for the theoretical explanation, I will need some extra readings to understand the lemma and theory of multiplicative groups, but it is really interesting. – iadvd May 18 '15 at 02:58
1

In ${\mathbb{Z}/n}^{\times}$, look at the set of $k$, $1\le k \le n$, for which $(k,n) = 1$ (multiplicative units in $\mathbb{Z}/n$). Calculate their orders (the smallest positive integer $i$ s.t. $k^i = 1$). Denote by $o$ the largest $i$ you get from your order calculation for all units. Then the right table entry is $o$, the left those $k$ with order $o$. In your example case for $n=8$, for all units $k$ different from 1, $k^2 =1$ mod $n$; and the units other than 1 are $\{3,5,7\}$.

gnometorule
  • 4,640
  • thank you! please may I ask you? I almost understood, but still some doubts... for instance for $n=8$ the multiplicative units are ${1,3,5,7}$ right? Then for each one of them I find the first $k^i \equiv 1 \mod(8)$ right? and then the largest i will locate the numbers I am looking for. Is that right? thank you! – iadvd May 18 '15 at 02:45
  • 1
    That's correct, as long as you mean the first such i, which is its order (I'm sure you mean that). Note that if $x^i = 1$ mod n, then $x^{i+kn}= 1$ mod n for any integer k, also $x^{2i} = (x^i)^2 = 1^2= 1$; etc. – gnometorule May 18 '15 at 02:51
  • 1
    yes I meant that. This was cool, thank you! – iadvd May 18 '15 at 02:57
  • 1
    worked like a charm! added the Python code to the question, it could be helpful for other people! – iadvd May 18 '15 at 03:31
  • hi, May I abuse of your time and knowledge? I have used your kind explanation for the following test, which is the reason why I wanted to obtain the list of maximum order elements. As you understood my question probably you will have a good point of view of this, just if you want and have time, if not it is totally ok, thanks!: http://math.stackexchange.com/questions/1287585/conjecture-inside-the-maximum-order-elements-to-mod-n-of-an-even-number-at-leas – iadvd May 18 '15 at 08:29
  • It's awesome that you come up with a conjecture relating to the goldbach conjecture, but that is a bit above my pay grade. :) @iadvd – gnometorule May 18 '15 at 16:40
  • it is just an observation I did, but I can not support it theoretically... my knowledge is really very poor. – iadvd May 18 '15 at 23:49
  • hi again! sorry may I ask you again? this one is easy... has this "maximum order elements to mod n" we were talking about in this question another more common name known by everybody? I mean for instance, when you read my question, you understood quickly what I was looking for, and then you wrote how to obtain them, but did you know that set of numbers by another name or is it really only known as the "maximum order elements to mod n"? Every time I try to explain something about this set, it seems that everybody finds difficult to understand what is it, thank you! :) – iadvd May 21 '15 at 06:10
  • 1
    @iadvd: I don't think so. I'm not familiar with one (off-hand), but that doesn't mean that there couldn't be one I don't know. :) – gnometorule May 21 '15 at 12:06
  • 1
    got it! it is the maximum value of the Carmichael function, it was explained in the main answer of this other question: http://math.stackexchange.com/questions/1292429/forall-n-not-exists-primitive-roots-modulo-n-if-maxord-nk1-m – iadvd May 22 '15 at 00:24