Find all integers n such that $(\frac{n^3-1}{5})$ is prime?
My Approach:
I wrote all the prime which i will get after dividing $(n^3-1)$ by $5$.
$n^3-1=10,15,25,35,55,…,215$
which lead me to $n^3=11,16,26,…,216$, then I obtained $n=6$
My doubt is that how to check more value of $n$ without using modular arithmetic because the book I'm referring has not introduced it yet.
Second approach: $\frac{(n^3-1)}{5}=\frac{(n-1)(n^2+n+1)}{5}$
But my second approach too does not lead me anywhere.
This problem is from the book Pathfinder for Olympiad Mathematics
Best Answer
First, since you need the fraction to be a prime, you have $n^3-1 = 5p$ with $p$ a prime number. Now, $n^3-1=(n-1)(n^2+n+1)$. So this leads to the idea that one of those factors is $5$ and the other $p$.
If $n-1=5$, $n=6$ so $n^2+n+1= 36+6+1= 43$.
If $n-1\neq 5$, $n^2+n+1=5$, so $n(n+1)=4$, and you can check in multiple ways that this equation doesn't have solutions. (one way is noticing the parity of the lhs and forcing the odd factor to be $1$, so the other won't reach to be $4$)
EDIT: As how mentioned @lhf , I'm missing if $n^3 - 1 = -5p$ So considering this case, you have these cases:
If $n-1 = -5$, $n = -4$, so $n^2+n+1 = 16 - 4 +1 = 13$
If $n-1 \neq -5$, then $n^2+n+1 = -5$, and this leaves to $n^2+n = -6$, obtaining with general formula this doesn't give any possible solution.
Also,
If $n-1 = -5p$, $n^2+n+1=1$, but this will mean $(5p)^2-5p=0$, implying $5p(5p-1)=0$, forcing $5p-1=0$, but that leaves $p$ not being a prime.
If $n-1 = 5p$, then $n = 5p + 1$, so $(5p+1)^2 + 5p + 1 +1 = 0$, giving $25p^2+15p + 3 = 0$, but this equation doesn't have any integer solution, since this would mean $5\mid 3$, which is a nonsense.
Then the solutions are $(n,p)$ are $(6,43), (-4,-13)$