Note that $\phi(23)=22$ and $\phi(22)=10$, so if $\operatorname{lcm}(23,22,10)=2530 \mid k$ then $f(n+k) \equiv f(n)(\bmod 23)$ is always true. We show that this is necessary as well. Choosing $n \equiv 0(\bmod 23)$, we see that $k \equiv 0(\bmod 23)$. Thus $n+k \equiv n(\bmod 23)$ always, and we can move to the exponent by choosing $n$ to be a generator modulo 23 : $(n+k)^{n+k} \equiv n^{n}(\bmod 22)$ The choice of $n$ here is independent of the choice $(\bmod 23)$ since 22 and 23 are coprime. Thus we must have again that $22 \mid k$, by choosing $n \equiv 0(\bmod 22)$. But then $n+k \equiv n(\bmod 11)$ always, and we can go to the exponent modulo $\phi(11)=10$ by choosing $n$ a generator modulo 11 : $n+k \equiv n(\bmod 10)$ From here it follows that $10 \mid k$ as well. Thus $2530 \mid k$ and 2530 is the minimum positive integer desired.
Find the minimum positive integer $k$ such that $f(n+k) \equiv f(n)(\bmod 23)$ for all integers $n$.