where $p$ is a prime number and $n$ is a positive integer. 

What I have done so far:  

I thought that a solution to $ x^p \equiv x \pmod p $ is a solution to $x^p \equiv x \pmod{ p^n} $.  

Now $\gcd(x^p,p)=1$ or $\gcd(x^p,p)=p $.  

I am not sure how to proceed from this point.

Edit:I have been considering using Hensel's lemma to solve this equation since we have p^n so considering the equation mod p and lifting it could help. But subtracting x from both sides and solving, I get $ x \equiv 0 mod p$ or $x^{p-1} \equiv 1modp$ Substituting x in the first case into f'(x) yields $ -1 \not\equiv 0modp$ but, how would I substitute x in the second case ? 

Any ideas or hints are welcome and much appreciated