Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

$\def\ord{\operatorname{ord}}$I could not prove the following statement. Could you please help me?

Let $\ord_p a = p-1$. Show that for every $c∈\mathbb Z$, $\gcd(c,p)=1$, there exists $1≤i≤p-1$ such that $c≡a^i \pmod p$

share|cite|improve this question
up vote 4 down vote accepted

Consider the numbers $a^1, a^2, a^3,\dots, a^{p-1}$. None of them is congruent to $0$ modulo $p$. For if $a^i$ is divisible by $p$, then so is $a$, contradicting the fact that $a^{p-1}\equiv 1\pmod{p}$.

Suppose there are two numbers $i$ and $j$, with $1\le i\lt j\le p-1$, such that $a^i\equiv a^j \pmod{p}$. Then $a^{j-i}\equiv 1\pmod{p}$. (This can be proved by cancellation, or more precisely by multiplying both sides by $b^i$, where $b$ is the inverse of $a$ modulo $p$.) Since $1\le j-i\lt p-1$, this contradicts the fact that $a$ has order $p-1$.

So all of our $a^i$ are distinct modulo $p$. That means that their remainders on division by $p$ take on $p-1$ distinct values. That means that the remainders travel, in some order, through all numbers from $1$ to $p-1$. It follows that for any $c\not\equiv 0\pmod{p}$, there is an $i$ with $1\le i\le p-1$ such that $a^i\equiv c\pmod{p}$.

share|cite|improve this answer
Oops. Thanks for clarifying :P – Chris Nov 13 '12 at 15:26

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.