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

When is $$2^y\mod 3^x = 1$$

where $x,y\geq0$ and $x,y$ are integers. I know the trivial solutions but can anyone please provide non-trivial solutions. Thanks.

share|cite|improve this question
how do you do >= in Tex? – fosho Sep 29 '12 at 20:24
Please try to avoid double $$ in titles. \geq yields $\geq$, and \leq yields $\leq$. – yunone Sep 29 '12 at 20:24
Oh ok thanks. Sorry about the title. – fosho Sep 29 '12 at 20:25
Use a \geq for greater than/equal to and \leq for less than/equal to. – Michael Dyrud Sep 29 '12 at 20:25
What are the trivial solutions? $y=0$; $x=1,2|y$; $x=2, 6|y$; and in general $2\cdot 3^{x-1}|y$? – Hagen von Eitzen Sep 29 '12 at 20:29
up vote 2 down vote accepted

Let $x\ge 2$. Then since $2$ is a primitive root of $3^2$, it is a primitive root of $3^x$. It follows that $2$ has order $\varphi(3^x)=2\cdot 3^{x-1}$ modulo $3^x$. (One can prove the order result with less machinery.)

Thus the "trivial" Euler's Theorem solutions are the only ones.

share|cite|improve this answer

Do not know if you consider this not trivial, but by Euler's theorem, and the fact that $\phi(3^x)=2\cdot3^{x-1}$, you get the set of solutions $(x,k\cdot2\cdot3^{x-1})$ for any $k,x$ positive integers

share|cite|improve this answer
I do not see a question. This seems a bit chatty or such. Seems like a case of ' not a real question '. – mick Oct 11 '12 at 15:54

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.