# Modulo arithmetic - fact?

1. Jan 1, 2013

### Ted123

Is it true that if $A \equiv B \mod{\varphi(N)}$ where $\varphi (N)$ is Euler's totient function then $a^A \equiv a^B \mod{N}$?

I'm not after a proof or anything but I didn't do a number theory course and it seems that this fact is used in many questions I'm currently doing.

2. Jan 1, 2013

### Hurkyl

Staff Emeritus
You need to assume gcd(a,N)=1 as well.

3. Jan 1, 2013

### johnqwertyful

The more popular format is

$a^{\varphi(n)}\equiv 1 (mod \;n)$ where $gcd(a,n)=1$