-1

From Euler's theorem we know that $a^{\varphi(n)} \equiv 1 \text{ (mod n)} $ and it works when $n$ and $a$ are coprime positive integers. I found following formula which may be useful for me $a^{x} \equiv a^{x \text{ mod } \varphi(n)} \text{ (mod n)}$. Is this formula correct? If yes, can anyone explain why this is true?

  • 1
    If $x$ is an integer. For all $k$ relative, $ a^{k\phi(n) +x} =a^x $ hence your result. – EDX May 13 '20 at 08:24

2 Answers2

0

If $x$ is an integer. For all $k\in \mathbb{Z} $

By multiplying $a^x$, $k$ times by $a^{\phi(n)} $

$$ a^{k\phi(n) +x} = a^x \mod(n) $$

hence your result.

$$a^{x \mod \phi(n) } = a^x \mod(n)$$

EDX
  • 1,797
  • 1
    "for all $k$ relative"? What does that mean? – Wojowu May 13 '20 at 09:31
  • I modify a bit to be clearer. Take on natural numbers to be clearer. Actually it could be for relatives numbers (negative natural) in the meaning of inverse in $\mathbb{Z} /n\mathbb{Z} $ – EDX May 13 '20 at 11:11
0

Let $x\in\Bbb Z$ and use division with remainer to obtain $x=q\varphi(n)+r$. Note then that $x\equiv r\mod\varphi(n)$ and on the other hand by Euler's Theorem $a^{\varphi(n)}\equiv1\mod n$ therefore $$a^x\equiv a^{q\varphi(n)+r}\equiv\left(a^{\varphi(n)}\right)^qa^r\equiv a^r\mod n\implies a^x\equiv a^{x\mod\varphi(n)}\mod n$$ Euler's theorem tells you nothing more than "if you multiply an element with itself often enough you end up with $1$"; to put it different, eventually you will begin running in circles and the length of the circle is at most $\varphi(n)$. In particular, running the circle once, twice or not at all does not change anything when working within $\Bbb Z/n\Bbb Z$ (the name "clock arithmetic" is no coincidence :) ).

mrtaurho
  • 16,103