0
$\begingroup$
? znstar(15)[2][1]
%1 = 4
? eulerphi(15)
%2 = 8
? znprimroot(15)
%3 = Mod(2, 15)
? znstar(60)[2][1]
%4 = 4
? eulerphi(60)
%5 = 16
? znprimroot(60)
  ***   at top-level: znprimroot(60)
  ***                 ^--------------
  *** znprimroot: domain error in znprimroot: argument = 60
  ***   Break loop: type 'break' to go back to GP prompt
break>
?

The meaning is the following : $\phi(15)=8$ , $\lambda(15)=4$ and $2$ is a primitive root modulo $15$ in the sense that it has order $4$ modulo $15$.

On the other hand, $\phi(60)=16$ , $\lambda(60)=4$ and $7$ has order $4$ mod $60$.

Why does PARI output an error message here ?

In a turorial, I read PARI would output a primitive root, if the unity group is cyclic. This is neither the case at $n=15$ nor at $n=60$, or do I miss something ?

$\endgroup$
  • 2
    $\begingroup$ Right, the group $\mathbb{Z}/60\mathbb{Z}$ is not cyclic, so that there is no primitive root - error. $\endgroup$ – Dietrich Burde Nov 21 '15 at 14:27
  • $\begingroup$ So, the group $Z_n$ has to be cyclic, not the group $Z_n^*$ ? $\endgroup$ – Peter Nov 21 '15 at 14:29
  • 1
    $\begingroup$ No, primitive root is defined as a generator of the multiplicative group (the additive group of $\mathbb{Z}/n\mathbb{Z}$ is always cyclic). $\endgroup$ – Dietrich Burde Nov 21 '15 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.