Integer as Sum of Polygonal Numbers/Lemma 3

Theorem
Let $n, m, r \in \R_{>0}$.

Suppose $\dfrac n m > 1$.

Let $b \in \openint {\dfrac 2 3 + \sqrt {8 \paren {\dfrac n m} - 8} } {\dfrac 1 2 + \sqrt {6 \paren {\dfrac n m} - 3} }$.

Define:
 * $a = 2 \paren {\dfrac {n - b - r} m} + b = \paren {1 - \dfrac 2 m} b + 2 \paren {\dfrac {n - r} m}$

Then $a, b$ satisfy:
 * $b^2 < 4 a$
 * $3 a < b^2 + 2 b + 4$

$b^2 < 4 a$

 * $b^2 - 4 a = b^2 - 4 \paren {1 - \dfrac 2 m} b - 8 \paren {\dfrac {n - r} m}$

By the Quadratic Formula, $b^2 - 4 a < 0$ when $b$ is between:

Observing the term in the square root, we have:
 * $2 - \dfrac 4 m - \sqrt {\paren {2 - \dfrac 4 m}^2 + 8 \paren {\dfrac n m} - 8 \paren {\dfrac r m} } < 0$

Since $b > 0$ this is satisfied.

Also we have:

showing that first inequality is satisfied.

$3 a < b^2 + 2 b + 4$

 * $b^2 + 2 b + 4 - 3 a = b^2 - \paren {1 - \dfrac 6 m} b - 6 \paren {\dfrac {n - r} m} + 4$

By the Quadratic Formula, $b^2 + 2 b + 4 - 3 a > 0$ when $b$ is greater than:

showing that second inequality is satisfied by any $b > \dfrac 1 2 + \sqrt {6 \paren {\dfrac n m} - 3}$.