Hello everyone!

I'm new to modular arithmetic, I read a few identities like:

$\displaystyle (a+b)\mod N = ( (a\mod N) + (b\mod N) )\mod N$ and

$\displaystyle (a \times b)\mod N = ( (a\mod N) \times (b\mod N) ) \mod N$... I searched this, but couldn't find an identity for this:

$\displaystyle a^b\mod N = (a \times a \times \cdots \times a) \mod N = (a \mod N)^b \mod N$. But so what? We didn't reduce the equation, we just replaced $\displaystyle a$ by $\displaystyle a \mod N$.

Is there a way that calculates or defines $\displaystyle a^b \mod N$ ?