Carmichael function and primitive roots of unity

245 Views Asked by At

I have been reading about the Carmichael function recently and I would like to ask about some elementary implication of its properties as I haven't found it stated explicitly.

If I understand it right: when the Carmichael function $\lambda$ for a number $p$ takes the value $\lambda(p)=p-1,$ then $p$ is a prime number. This also means that there must exist a primitive root of unity of that order: $\exists a: a^{p-1} \equiv 1 \pmod p.$

Is it then correct to say, that $p$ is a prime number if and only if $\mathbb{Z}/p\mathbb{Z}$ has a primitive root of unity of the order of $p-1$?