How to use prove this $p^4\equiv p\pmod {13}$ 
Let a prime number $p$, and $n$ a positive integer such $$p\mid n^4+n^3+2n^2-4n+3.$$
Show that $$p^4\equiv p\pmod {13}.$$

A friend of mine suggested that I might be able to use the results problem.

My take on this problem is to solve the quartic equation using the quartic formula. To use this formula, the $x^3$ term needs to be eliminated, which can be done by substituting $y=x-\frac {1}{4}$. The result is, after quite a bit of algebra, is
$y^4+\frac{13}{8} y^2 - \frac{39}{8}y -\frac{1053}{256}=0$
To solve this, use the cubic resolvent. For $y^4+py^2+qy+r$ this is
$z^3+2pz^2+(p^2-4r)z-q^2=0$
This yields
$z^3+\frac{13}{4}z^2-\frac{221}{16}z-\frac{1521}{64}=0$
Solve this using the cubic formula, which involves eliminating the $z^2$ term with $w=z-\frac{13}{16}$. After a lot more algebra, one finds that the roots are $\frac{13}{4}$, $\frac{-13+2\sqrt(13)}{4}$, and $\frac{-13-2\sqrt(13)}{4}$. That means that a root of the reduced quartic is
$\frac{1}{2}  (\sqrt(\frac{13}{4})+\sqrt(\frac{-13+2\sqrt(13)}{4}) + \sqrt(\frac{-13-2\sqrt(13)}{4})$
Going back to the original quartic, one get, as one of the roots
$-\frac{1}{4}+\frac{1}{2}  (\sqrt(\frac{13}{4})+\sqrt(\frac{-13+2\sqrt(13)}{4}) + \sqrt(\frac{-13-2\sqrt(13)}{4})$
Now if we take this polynomial mod 13, all the square root stuff beyond the $-\frac{1}{4}$ is zero, so a root mod 13 is $-\frac{1}{4}$. By trial and error or solving a diophantine equation, one gets that $-\frac{1}{4}=3$ mod 13. Then note that $3^4 = 3$ mod 13, which gives the intended result.
