Period of the sequence $1^1,2^2,3^3, \cdots$, considered (mod $p$)

470 Views Asked by At

Show that the sequence $1^1,2^2,3^3, \cdots$, considered (mod $p$) is periodic with least period $p(p-1)$.

I came across this solution:

https://math.stackexchange.com/a/1894375/697936

The one thing that I am not unable to understand here is : $k^k k^{p-1} \equiv k^k$.

My claim: If $(k,p)=1$ then from Fermat's Little Theorem we have $k^{p-1}\equiv 1 \pmod{p}$ then $(k^{p-1})^p \equiv 1 \pmod{p}$. And so this $k^k k^{(p-1)p} \equiv k^k\pmod{p}$ holds.

But what happens if $(k,p) \neq 1$?

Can someone please explain this. Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

If $(k,p)\neq1$ then $(k,p)=p$ and hence $k\equiv0\pmod{p}$. So $$k^kk^{p-1}\equiv0\pmod{p}\qquad\text{ and }\qquad k^k\equiv0\pmod{p}.$$


Another way to see that $k^kk^{p-1}\equiv k^k\pmod{p}$ is to phrase Fermat's little theorem as $$\forall k:\ k^p\equiv k\pmod{p}.$$ Then multiplying both sides by $k^{k-1}$ yields the desired identity.