I really need some help at this problem:
Let $p$ be a prime number and $n$ a natural number, $n\ge2$ such that $n \mid p-1$ and $p \mid n^3-1$. Prove that $4p-3$ is a square.
So $p \mid (n-1)(n^2+n+1)$
What if $p \mid n-1$? Treating the cases wasn't too efficient. I was thinking about Fermat's theorem but it didn't helped really much.
A hint would be really apreciated. Thanks!
Note $p \mid n-1$ is impossible because $n \le p-1$, so we have $p \mid n^2+n+1$.
Since $n \mid p-1$, we can write $p = an+1$ for some integer $a \ge 1$. Since $p \mid n^2+n+1$, we can write $$n^2 + n + 1 = bp = b(an+1)$$ for some integer $b \ge 1$.
Reducing modulo $n$ gives $1 \equiv b \pmod{n}$, so write $b = rn+1$ for some integer $r \ge 0$. Putting this in the above equation gives $$n^2 + n + 1 = (rn+1)(an+1).$$