I am doing some exam preparation and can't figure out how to do the following question. It seems to be a regular question and was wondering if anyone who could tell me an approach to this style of question in laymen's term as everything tutorial i have found is either unrelated or over complicated. The question is as followed
For each positive integer $n$, determine the value of the unique integer $x_n$ satisfying $0 \leq x_n < 29$ for which $384^n ≡ x_n \pmod {29}$. (N.B., there will exist integers $r$ and $m$ such that $384^j ≡ 384^k \pmod {29}$ whenever $j ≥ r, k ≥ r$ and $j ≡ k \pmod m$. This fact should enable you to devise a specification that yields the value of $384^n \pmod{29}$ for all positive integers n, no matter how large.)