Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find out $\log_g {-1}$ in $\mathbb{Z}_n$ where $n$ is an odd prime and $g$ is a primitive root mod $n$. How do I do that? Thanks.

share|cite|improve this question
Do you know what log_g 1 is? – Qiaochu Yuan Dec 20 '10 at 1:17
It's $\varphi(n) = n - 1$. – KarlX Dec 20 '10 at 1:39
Correct. Now what would be special about -1? – Ross Millikan Dec 20 '10 at 1:42
@KarlX: It's not very common to use $n$ to denote a prime: it is usually used to denote a composite number, with $p$ (or in some situations, $\ell$) used for primes (and $q$ for prime powers). – Arturo Magidin Dec 20 '10 at 1:56
Try squaring $-1$. – Yuval Filmus Dec 20 '10 at 2:38

Seems you are looking for $x$ such that $g^x = -1$.
$x = \frac{n-1}{2}$ seems to work because $\phi(n)=n-1$ and g is primitive root and $g^{\phi(n)}=1$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.