I've been doing some computational research into the class number $h(d)$ which for my purposes is defined as the number of positive definite binary quadratic forms $(a,b,c)$ which are reduced, primative, and have discriminant $d = b^2 - 4ac$.
After checking for afew values of $p$ and $d$ it seems the following holds: $$h(dp^2) = \left[ p - \left(\frac dp\right)\right] h(d) \tag{$*$} $$ where $d<-4$, $p$ is an odd prime, and $(d/p)$ is the Legendre Symbol.
I am looking for a source to cite ($*$) or a more general result from but have failed to find one - could anyone provide such a source?
[I'm not really looking for a proof of $(*)$ unless it is especially accessible as my knowledge of the group theory underlying quadratic forms is limited]