<s>[INST] Given that $n^4-4n^3+14n^2-20n+10$ is a perfect square, find all integers n that satisfy the condition So, I tried solving that by 
$$n^4-4n^3+14n^2-20n+10=x^2\\10=x^2-a^2, a^2=n^4-4n^3+14n^2-20n+10\\10=(x+a)(x-a)$$ but I couldn't find any integers when I solved it
 [/INST] Let f(n) = n^4 - 4*n^3 + 14*n^2 - 20*n + 10
As Daniel Fischer mentioned you can apply the substitution $m = n-1$ to get f(m+1) = m^4 + 8*m^2 + 1
complete the square, we want to solve $$(m^2 + 4)^2 - 15 = a^2.$$ subtract one from both sides an use the difference of squares factorization $$m^2 (m^2 + 8) = (a - 1)(a + 1)$$
lets put $b = a-1$ and $h = n^2$, we can work on this factored form of the problem: $$h (h + 8) = b (b+2)$$

Clearly there are 4 solutions attained by making both sides zero $(h,b) = (0,0), (0,-2), (-8,0), (-8,-2)$.
Let's restrict to positive integer solutions from now on since $h$ is a square it must be positive. Since $8 > 2$ A solution must have $h < b$. Put $L(h) = h (h + 8)$ and $R(b) = b (b+2)$.


*

*$L(h) < B(h)$

*$L(h) > B(h+6)$
therefore any solution will have $b = h+1$ or $h+2$ or $h+3$ or $h+4$ or $h+5$. With this in mind let's substitute in $b = h+k$:
So we only need to find small $k$ integer solutions of the following linear equation now
$$0 = (-2k + 6)h + (-k^2 - 2k + 1)$$
checking each case we quickly find there are no solutions at all.

In conclusion the only solutions are the four listed from making both sides zero.
</s>