<s>[INST] Let $n > 1$ be a natural number and $p$ be a prime such that $p\mid n^3-1$ and $n\mid p-1$. Prove that $4p-3$ is a perfect square. 
Question: Let $n > 1$ be a natural number and $p$ be a prime such that $p\mid n^3-1$ and $n\mid p-1$. Prove that $4p-3$ is a perfect square.

My solution: Given that $p\mid(n^3-1)$, thus we have $p\mid(n-1)$ or $p\mid(n^2+n+1)$. We also have $n\mid(p-1)$. Let us make cases. 
Case 1: $p\mid(n-1)$ and $n\mid(p-1)$. Since $p-1\ge 1$ and $n>1$. Thus we can conclude that $p\mid(n-1)\implies p\le n-1$ and $n\mid(p-1)\implies n\le p-1$. Thus we have $n\le p-1\le n-2\implies n\le n-2\implies 0\le-2$, which is a clear contradiction. Hence $p\not\mid(n-1)$. 
Case 2: $p\mid(n^2+n+1)$ and $n\mid(p-1)$. Thus, $\exists k\in\mathbb{Z},$ such that $pk=n^2+n+1$ and $\exists q'\in\mathbb{Z}$, such that $p=nq'+1$. Now $n^2+n+1\equiv 1\pmod n$ and $p\equiv 1\pmod n\implies pk\equiv k\pmod n\implies k\equiv pk=n^2+n+1\equiv 1\pmod n\implies k\equiv 1\pmod n.$ 
Thus $\exists q\in\mathbb{Z}$, such that $k=nq+1$. Hence we have $$p=nq'+1 \text{ and } k=nq+1\\ \implies pk=n^2qq'+n(q+q')+1=n^2+n+1\\\implies n(1-qq')=q+q'-1.$$ 
Now $p=nq'+1\implies nq'=p-1$ and $p-1\ge 1$. Thus $nq'\ge 1$. Now since $n>1$, hence $q'\ge 1$. This again implies that $nq'>1\implies p>2\implies p\ge 3.$ 
Now $pk=n^2+n+1>3\implies pk>3.$ Now $p\ge 3\implies k\ge 1.$ Now again we have $k=nq+1$. Since, $k\ge 1\implies nq+1\ge 1\implies nq\ge 0\implies q\ge 0$ $(\because n>1).$ 
Thus $q\ge 0,q'\ge 1\implies qq'\ge 0.$ Also $q+q'\ge 1\implies q+q'-1\ge 0.$ This implies that $n(1-qq')=q+q'-1\ge 0\implies n(1-qq')\ge 0\implies 1-qq'\ge 0 \implies qq'\le 1.$ 
Therefore, we simultaneously have $qq'\ge 0$ and $qq'\le 1$, which implies that $qq'=0$ or $qq'=1$. 
Let us make cases. 
Case 1: $qq'=1\implies q=1$ and $q'=1$. Thus $q+q'-1=1$ and $n(1-qq')=0\implies n(1-qq')\neq q+q'-1$, which is a contradiction to the fact that $n(1-qq')=q+q'-1$. Hence $qq'\neq 1$. 
Case 2: $qq'=0\implies q=0$. Thus $n=q'-1\implies q'=n+1$, which in turn implies that $p=n(n+1)+1.$ Thus $4p-3=4n(n+1)+1=4n^2+4n+1=(2n+1)^2$. 
Hence after analyzing all the cases we can conclude that $4p-3$ is a perfect square and is equal to $(2n+1)^2$, and we are done. 
P.S.: I have edited the post and have attached the correct solution to the question.
 [/INST] As @user760870 said: from $pk>1$ and $p\geq 3$ it is not necessary true $k>1$.


*

*Case 2. If we multiply both divisibility relations we get: $$pn\mid pn^2+pn+p-n^2-n-1\implies pn\mid p-n^2-n-1$$
If $p\geq n^2+n+1$ then $p= n^2+n+1$ sp $$4p-3 = 4n^2+4n+1 = (2n+1)^2$$
If $p\leq n^2+n+1$ then $$pn\leq n^2+n+1-p\implies p\leq {n^2+n+1\over n+1}<n+1$$
So $p\leq n$ and $n\leq p-1$. A contradiction.
</s>