<s>[INST] For what values of $a$ does $b\in\mathbb{N}$? I've the following function:
$$b=\frac{1}{2}-\frac{1}{r-2}+\sqrt{\frac{1}{4}-\frac{r-3}{(r-2)^2}+\frac{a(1+a)}{r-2}+\frac{a(a^2-1)}{3}}$$
I know that:


*

*$\text{a}\ge1$ and $a\in\mathbb{N}$;

*$\text{r}\ge3$ and $r\in\mathbb{N}$.



If I set the value of $r$, what does $a$ has to be in order to let $b\ge1$ and $b\in\mathbb{N}$? Are there restrictions on $a$ in order to let $b\ge1$ and $b\in\mathbb{N}$?

 [/INST] Let $s = r - 2$. Then $$b=\frac{1}{2}-\frac{1}{s}+\sqrt{\frac{1}{4}-\frac{s - 1}{s^2}+\frac{a(1+a)}{r-2}+\frac{a(a^2-1)}{3}}$$ $$b = \frac{1}{2}-\frac{1}{s}+\sqrt{\frac{1}{4}-\frac{1}{s}+\frac{1}{s^2}+\frac{a(1+a)}{s}+\frac{a(a^2-1)}{3}}$$ $$b = \frac{1}{2}-\frac{1}{s}+\sqrt{\left(\frac{1}{2}-\frac{1}{s}\right)^2+\frac{a(1+a)}{s}+\frac{a(a^2-1)}{3}}$$. 
Let $t = \frac{1}{2}-\frac{1}{s}$ or $\frac{1}{s} = \frac{1}{2} - t$, such that $$b = t + \sqrt{t^2 - a(1 + a)t + \frac{a(1 + a)}{2} + \frac{a(1 + a)(a - 1)}{3}}$$
$$b = t + \sqrt{t^2 - a(1 + a)t + \frac{3a(1 + a) + 2(a - 1)a(1 + a)}{6}}$$
$$b = t + \sqrt{t^2 - 2t\frac{a(1 + a)}{2} + \frac{a(1 + a)(2a + 1)}{6}}$$
$$b = t + \sqrt{t^2 - 2t\sum_{i = 1}^{a} i + \sum_{i = 1}^{a} i^2}$$
As for all integers $a$, $$t < \sum_{i = 1}^{a} i$$
$$b = t + \sqrt{\left(-t + \sum_{i = 1}^{a} i\right)^2} = t - t + \sum_{i = 1}^{a} i = \sum_{i = 1}^{a} i = \frac{a(a + 1)}{2}$$
$b$ is only dependent upon $a$. If $a\in \mathbb{N}$ and $a \geq 1$, then $b\in \mathbb{N}$ and $b > 1$.
</s>