Factoring $\frac{n(n+1)}2x^2-x-2$ for $n\in\mathbb Z$ I was factoring quadratic polynomials for high-school practice and I noticed a pattern: $$\begin{align} x^2-x-2 &=(x+1)(x-2) \\ 3x^2-x-2 &=(x-1)(3x-2) \\ 6x^2-x-2 &= (2x+1)(3x-2) \\ 10x^2-x-2 &= (2x-1)(5x+2) \\ 15x^2-x-2 &= (3x+1)(5x-2) \\ 21x^2-x-2 &= (3x-1)(7x+2) \\ &\vdots\end{align}$$ So it seemed that, for any integer $n$, we have:

$$\frac{n(n+1)}2x^2-x-2=\Big(\left\lceil{\frac n2}\right\rceil x+(-1)^{n+1}\Big)\Big(\left\lceil{n+\frac{(-1)^n}2}\right\rceil x + 2(-1)^n\Big).$$

where the pattern I showed above begins with $n=1$ and ends with $n=6$.
I am not sure how to prove this (assuming it is true). I know that $-2=(-1)^{n+1}\cdot 2(-1)^n$ but I don't know how to prove that: $$\left\lceil{\frac n2}\right\rceil\cdot \left\lceil{n+\frac{(-1)^n}2}\right\rceil=\frac{n(n+1)}2\tag{$\star$}$$ and $$2(-1)^n\left\lceil{\frac n2}\right\rceil+(-1)^{n+1}\left\lceil{n+\frac{(-1)^n}2}\right\rceil=-1$$ which I believe is necessary to prove this conjecture. Since $n$ is an integer, I was thinking of letting $n=\left\lceil\frac k2\right\rceil$ for any real $k$ or something, and I'd assume that $$\left\lceil{\frac n2}\right\rceil=\left\lceil{\frac{\left\lceil{\frac k2}\right\rceil}2}\right\rceil=\left\lceil{\frac k4}\right\rceil$$ but I'm not sure how "round-off arithmetic" works (informally speaking). Any help is appreciated.

Edit:
Thanks to @lone_student's comment, I have shown $(\star)$ to be true for all $n\in\mathbb Z$ by considering $n$ even and odd.
Lemma:$$\left\lceil {\frac nm}\right\rceil=\left\lfloor{\frac{n-1}m+1}\right\rfloor\tag1$$
Here, $m=2$.
Also: $$n-\left\lfloor\frac n2\right\rfloor=\left\lceil\frac n2\right\rceil\tag2$$
Using these, we can show that:
$$\frac{n(n+1)}2=\left\lceil\frac n2\right\rceil\cdot\left\lceil{n+\frac{(-1)^n}2}\right\rceil=\underbrace{\Big(n-\left\lfloor\frac n2\right\rfloor\Big)}_{\text{By } (2)}\cdot\underbrace{\left\lfloor\frac{2n+(-1)^n-1}2+1\right\rfloor}_{\text{By (1)}}$$
When $n=2k\in\mathbb Z$ we have $$k(2k+1)=\big(2k-\left\lfloor k\right\rfloor\big)\lfloor2k+1\rfloor=k(2k+1)$$ since $k$ and $2k+1$ are integers, and, by definition, $\lceil \alpha\rceil =\lfloor \alpha\rfloor = \alpha$ iff $\alpha\in\mathbb Z$.
Similarly, when $n=2k-1$, we have: $$k(2k-1)=\Big(2k-1-\left\lfloor k-\frac 12\right\rfloor\Big)\lfloor 2k-1\rfloor = k(2k-1)$$ since obviously $\left\lfloor k-\frac 12\right\rfloor = k-1$ for $k\in\mathbb Z$.

I believe there was some confusion towards my question: did I mean to factorise the quadratic in terms of $n$ or did I mean to prove specifically the ceiling-function product identity? I did intend to ask a question on the latter subject, but I had falsely assumed that the case-by-case polynomial pattern I showed above could only be represented through the ceiling functions. This was wrong.

Alternative factoring method:
When $B^2 - 4AC \geq 0,$ with $A > 0$, then $Ax^2 + Bx + C$ factors into
$A\left(x^2 + \frac{B}{A}x + \frac{C}{A}\right)$
$= A \left[\left(x + \frac{B}{2A}\right)^2 - \frac{B^2}{4A^2} + \frac{C}{A}\right]$.
$= A \left[\left(x + \frac{B}{2A}\right)^2 - \frac{B^2 - 4AC}{4A^2}\right]$
$= A \left[\left(x + \frac{B}{2A}\right)^2 - \left(\frac{\sqrt{B^2 - 4AC}}{2A}\right)^2\right]$
Under the assumptions, this factors into the difference of two squares as
$$= A\left[\left(x + \frac{B}{2A} + \frac{\sqrt{B^2 - 4AC}}{2A}\right) \times \left(x + \frac{B}{2A} - \frac{\sqrt{B^2 - 4AC}}{2A}\right)\right].\tag1$$
With the posted problem, you have that 
$A = \frac{n(n+1)}{2}$ 
$B = -1$ 
$C = -2$.
From this you can immediately conclude (since $A>0, C<0$) that $B^2 - 4AC > 0$.  Therefore, the formula in (1) above applies.
$\frac{B}{2A} = \frac{-1}{n(n+1)}.$ 
$\frac{\sqrt{B^2 - 4AC}}{2A} = \frac{\sqrt{1 + 4n(n+1)}}{n(n+1)} = \frac{(2n+1)}{n(n+1)}.$
Therefore, $Ax^2 + Bx + C$ factors into
$\frac{n(n+1)}{2}\left[\left(x + \frac{-1}{n(n+1)} + \frac{(2n+1)}{n(n+1)}\right) \times 
\left(x + \frac{-1}{n(n+1)} - \frac{(2n+1)}{n(n+1)}\right)\right].$
This simplifies into 
$$\frac{1}{2n(n+1)} ~\left\{~
\left[~n(n+1)x + 2n\right] ~\times 
~\left[~n(n+1)x - 2(n+1)~\right]~
\right\}.$$
This further simplifies to
$$\frac{1}{2} \times \left[(n+1)x + 2\right]
 \times \left[nx - 2\right].\tag2$$
In (2) above, either $(n+1)$ or $n$ will be even, thus allowing the factor of $\frac{1}{2}$ to be cleared.
Therefore, you can forgo any consideration of the floor or ceiling functions, and simply divide the formula mentioned in (2) above into two cases: either $n$ is odd or $n$ is even.
Finally, while I showed the derivation of the formula in (2) above, my answer could have been significantly shorter, if I had instead provided a (sanity-checking) verification of the formula in (2) above.
That is, if you manually multiply the factors in (2) above, the product will be $Ax^2 + Bx + C$, where $A,B,C$ are as specified in your original question.
