What is the line of thinking to get $[(n^2+3n+1)^2-5n(n+1)^2]$ from $(n^4+n^3+n^2+n+1)$?

125 Views Asked by At

There is this one little tiny step along the working that I don't quite understand, but I think it is better if I write the whole problem and solution for clarity.

Problem: Factorize $5^{1995}-1$ into the product of $3$ integers, and every integer must be greater than $5^{100}$.

Solution: Let $5^{399}=n$. So, \begin{align} 5^{1995}-1 &= (5^{399})^5 - 1\\ &= n^5-1\\ &= (n-1)(n^4+n^3+n^2+n+1)\\ &= (n-1)[(n^2+3n+1)^2-5n(n+1)^2]\\ &= (n-1)[(n^2+3n+1)^2-5\times5^{399}\times(n+1)^2]\\ &=(n-1)[(n^2+3n+1)^2-5^{400}\times(n+1)^2]\\ &=(n-1)[n^2+3n+1+5^{200}(n+1)][n^2+3n+1-5^{200}(n+1)]\\ &=(5^{399}-1)(5^{798}+3\times5^{399}+5^{599}+5^{200}+1)((5^{798}+3\times5^{399}-5^{599}-5^{200}+1) \end{align} It is obvious that $5^{798}+3\times5^{399}+5^{599}+5^{200}+1>5^{100}$,
since $5^{399}-5^{100}=5^{100}\times(5^{299}-1)>5-1=4>1$, so $5^{399}-1>5^{100}$.
And since $(5^{798}+3\times5^{399}-5^{599}-5^{200}+1)-(5^{100}+1)$
$=5^{798}+3\times5^{399}-5^{599}-5^{200}-5^{100}$
$=(5^{798}-5^{599})+(5^{399}-5^{200})+(5^{399}-5^{100})+5^{399}>0$
so, $(5^{798}+3\times5^{399}-5^{599}-5^{200}+1)>5^{100}+1>5^{100}$.
So all the three factors are greater than $5^{100}$.

I understand the overall working, but I am wondering how can it get from $(n^4+n^3+n^2+n+1)$ to $[(n^2+3n+1)^2-5n(n+1)^2]$? Going backward is easy, but how about going forward? Does it use any formula or any tricks such as substitution or completing the square etc? In other words, what is the line of thinking? Or maybe are there any other alternatives?

Thanks so much! Helps are greatly appreciated.