# Is this possible to find modulo of different value and get same result?

Is it possible, for $a,b,m,n,x,y\in\mathbb N$ to have

$$x = y^a \pmod n \qquad \text{ and }\qquad y = x^b \pmod m ?$$

For example: $17=5^{11} \pmod{21}$ and $5=17^{11} \pmod{21}$ is an integer but i want to use different value of modulo in both equation instead of using $21$.

• You mean like $2 = 3^2 \bmod 7$ and $3 = 2^3 \bmod 5$? Sure it's possible Jul 10, 2013 at 19:18
• yes but how can u explain it?
– Aria
Jul 10, 2013 at 19:20
• $2$ is a primitve root modulo $5$ and $3$ is a primitive root modulo $7$ so we were guaranteed to find something... Jul 10, 2013 at 19:21
• Do you want $a=b$ in your statement? At least $a=b=11$ in the example. Jul 10, 2013 at 19:21
• no not necessary that a=b.
– Aria
Jul 10, 2013 at 19:22

Take any two powers $y^a$ and $x^b$. Then let $n$ be any divisor of $y^a-x$ and $m$ be any divisor of $x^b-y$.
For instance, consider $y^a=3^5$ and $x^b=7^{11}$. Now factor $3^5-7$ and $7^{11}-3$: $$3^5-7=2^2 \cdot 59, \text{ and } 7^{11}-3=2^2 \cdot 5\cdot 98866337.$$ Then, for example, you can take $n=59$, and $m=98866337$.
• how do u find the value of $n$=59 and $m$=98866337.
• By factoring $y^a-x$ and $x^b-y$. I updated the answer. Jul 10, 2013 at 19:37