While searching for a use for the "sum invariant" of indefinite binary quadratic forms of discriminant $D = n^2 + 4$ (see https://cs.uwaterloo.ca/journals/JIS/VOL17/Smith/smith5.html), I believe I have proved the following lower bound for the form class number $D$. Let $\tau(n)$ denote the number of positive divisors of $n$, and let $\tau_o (n)$ denote the number of odd divisors. Then:
$$ h(D) \geq \begin{cases} \tau(n) - 1 &\text{if $n$ is odd}\\ \tau(n) - 2 &\text{if $n \equiv 2 \pmod{4}$}\\ 2\tau_o(n) - 1 &\text{if $n \equiv 0 \pmod{4}$} \end{cases}$$
The idea is simple: for each factorization $n=ab$, we can create a forms $B_{a,b} = ax^2 + (ab+2) xy + by^2$ of discriminant $D$. These forms are primitive unless $a$ and $b$ are even. Using the sum invariant, it is easy to show two distinct such forms must be inequivalent, except that perhaps $B_{a,b}$ may be equivalent to $B_{b,a}$. I then devised a proof that $B_{a,b}$ can only be equivalent to $B_{b,a}$ if one of $a$ and $b$ is either $1$ or $2$, in which case they must be equivalent.
My question is: is the inequivalence of these forms already known, or at least the above bound? If so, is there a reference? If not, is the result interesting in the context of other known results/conjectures about these class numbers? I would hazard a guess that this bound gets pretty poor for large $n$, but for small $n$ it seems reasonably sharp.