I know that $x^2+x-1$ does not factor over the integers but $x^2+x-2$ does (i.e.: (x+2)(x-1)). If I have expressions of the form $x^2+x - n$ $\forall n \leq 2018$, how many of the expressions factor for $n \leq 2018$? I'm trying to notice a pattern because for the first 21 of these expressions I have that:
n = 2, 6, 12, 20 factor but the rest don't. How can I solve this?
The discriminat has to be perfect square, so $$1+4n = a^2$$ for some $a$. Now since $n\leq 2018$ we have $$a^2 \leq 8073\implies a\leq 89$$ and thus since $a$ must be odd it is for $45$ values reducible.