Cycle largest size for the value $a^p \pmod k$ I have a question.
If you can prove what may be the largest size for the cycle $a^p \pmod k$ where $a$, $p$ and $k$ are of course natural numbers?
I found on the Internet but quite specific cases (eg. For bases $a = 10$). I need a general solution.
Thank you for your help.

Have a look at the 
Multiplicative order for integers modulo $k$ or for general groups.
For example you have $\mathrm{ord}_{80}(31)=2$. As @JeanMarie has written the order is related to the Euler totient function. In fact 
$\mathrm{ord}_k(a)$ always divides $\varphi(k)$. 
We can do even better: $\,\mathrm{ord}_k(a)$ always divides the
Carmichael function $\lambda(k).\,$  And because $\lambda(80)= 4$ the maximum period length for $k=80$ is $4,\,$ this is achieved for
example with $a=3.$
$$3^2\equiv 9\pmod{80},\quad 3^3\equiv 27\pmod{80},\quad 3^4 \equiv 81 \equiv 1 \pmod{80}$$
