## Fall 2016, problem 25

Let $n,p$ be integers such that $n>1$ and $p$ is a prime. If $n\mid p-1$ and $p\mid n^3-1$, show that $4p-3$ is a perfect square.

### Comments

You used the fact that p is prime when you decided that there are two cases in the begining of your proof .

Dear board administrators: There seems to be a bug in the upvoting system: I just upvoted this solution myself in the same login session, in which I composed it.Strangely, it doesn't seem necessary to assume that $p$ is prime:

Since $(n^3 -1) = (n - 1)(1 + n + n^2)$ and $p | n - 1$ can easily be seen to contradict the assumptions, we have $$p | 1 + n + n^2$$ So let $k, l \in \mathbb{N}$, such that: $$ p - 1 = k n \textrm{ and } 1 + n + n^2 = l p$$ We observe:

The definition of $k$ and $l$ gives: $$p - kn = lp - n - n^2 \implies (l - 1) p = n (n + 1 - k)$$ We use the two facts established above on this equation: $p$ and $n$ are coprime, so $n | l - 1$. But $n > l - 1$, so

$$l = 1$$

This gives the required result immediately: $$4 p - 3= 4 lp - 3 = 4(1 + n + n^2) - 3= (2 n + 1)^2$$ Done.