<s>[INST] Find all positive integers $n$ such that $n^2+n+43$ becomes a perfect square Find all positive integers $n$ such that $n^2+n+43$ becomes a perfect square.
Since $n^2+n+43$ is odd,if it's a perfect square it can be written as: $8k+1$,then:
$$n^2+n+43=8k+1\Rightarrow\  n^2+n+42=8k\ \Rightarrow\ n(n+1)\equiv6\pmod8$$
So $n$ becomes $2,5,...$ but $5$ doesn't work!!
 [/INST] Trying to solve: $n^2+n+43=m^2$, multiply by $4$ and complete the square, and you get:
$$(2n+1)^2+4\cdot 43-1 = (2m)^2.$$
Subtract and you are trying to solve $(2m)^2-(2n+1)^2=171$.
The difference of two squares means you need:
$$(2(m-n)-1)(2(m+n)+1)=171=9\cdot 19$$
So you need to factor $171$ as two odd numbers whose sum is a multiple of $4$.
There will only be finitely many solutions.

Alternatively, you know that if $n>42$ then $n^2<n^2+n+43<n^2+2n+1=(n+1)^2$. So you only have to check finitely many values $n$.
</s>