My numeric tests showed that the sequence of the remainders of $n^k$ divided by $m$ are periodic with respect to $k$ $(n, k, m \in \mathbb{Z}^+, n < m)$.
For example, for $n = 7$ and $m = 30$:
$k = 1: \quad 7^1 = 7 = 0 \cdot 30 + \fbox{7}$
$k = 2: \quad 7^2 = 49 = 1 \cdot 30 + \fbox{19}$
$k = 3: \quad 7^3 = 343 = 11 \cdot 30 + \fbox{13}$
$k = 4: \quad 7^4 = 2401 = 80 \cdot 30 + \fbox{1}$
$k = 5: \quad 7^5 = 16807 = 560 \cdot 30 + 7$
$k = 6: \quad 7^6 = 117649 = 3921 \cdot 30 + 19$
$k = 7: \quad 7^7 = 823543 = 27451 \cdot 30 + 13$
$k = 8: \quad 7^8 = 5764801 = 192160 \cdot 30 + 1$
$k = 9: \quad 7^9 = 40353607 = 1345120 \cdot 30 + 7$
$\vdots$
In this case, the remainders apparently have a period of 4: $7, 19, 13, 1$.
My questions:
a) Does such a period always exist?
b) Is there a way to calculate the length of the period from $n$ and $m$, without calculating the remainders as I did above?
a) Yes, this sequence is always periodic, though it may start with a pre-periodic sequence.
The reason is that the remainder of $n^k$ divided by $m$ completely determines the remainder of $n^{k+1}$ divided by $m$, even if you don't know the value of $k$.
This is a special case of the fact that if you know the remainder of a number $a$ when divided by $m$, and the remainder of $b$ when divided by $m$, you know the remainder of $ab$ when divided by $m$, even if you don't know $a$ and $b$ specifically. That's the basis of calculation modulo m.
Since the number of possible remainders is finite ($=m$), a remainder has to repeat in the sequence $n^k$, and once the remainder of $n^{k_1}$ and $n^{k_2}$ is the same, so must be (by what I said above) $n^{k_1+1}$ and $n^{k_2+1}$, a.s.o. so the sequence of remainders repeated indefinitely.
To see an example with a pre-period sequence, consider $n=6, m=20$, where the remainder sequence is $6,16,16,\ldots$ This can only happen when $n$ and $m$ have a common divisor $>1$.
b) You can get some information on the period length, but if $m$ is really big, it might still not be easy to test all possibilities.
First, you can ignore all common prime factors of $n$ and $m$. If $p$ is such a factor, and $p^a$ is the highest power of $p$ that divides $m$, then $n^k$ will for all $k\ge a$ always be divisible by $p^a$. So the only remainders that will occur are those that are divisible by $p^a$ for $k\ge a$. So considering what happens for the prime factor $p$ is no longer giving any restriction, so it can be ignored.
So you can reduce $n$ and $m$ to $n'$ and $m'$ by dividing out their common prime factors (this can be done algorithimally fast by using the Euclidean algorithm). Then it is known that the length of the period must be a divisor of $\phi(m')$, where $\phi$ represents Euler's totient function.
Calculating $\phi$ when $m'$ is big and has an unknown prime number decomposition is hard. Even if you can do it, $\phi(m')$ might have a lot of divisiors, and as far as I know there is no easy way to find out which divisor is the period length. But I'm not an expert on this.