Question about a lesser-known “class number formula” of Gauss

My question refers to article 301 of section 5 of Gauss's D. A. - there Gauss gives an asymptotic formula for the mean number of classes of forms with positive discriminant ($$D>0$$):

$$h(D) = \frac{4}{\pi^2}\log (D) + \frac{8}{\pi^2}C+\frac{48}{\pi^4}\sum\frac{\log (n)}{n^2} - \frac{2 \log 2}{3\pi^2}$$

where $$C$$ is the Euler-Mascheroni constant. This formula is noteworthy because Gauss also tries to evaluate the error term in this class formula. I tried to search on the web for references to this analytic result of Gauss but all I found is articles about his asymptotic class number formula for forms with negative discriminant ($$D<0$$), which Gauss gives in the next article of D. A. (article 302).

My question is mainly about getting a reference for this result of Gauss. If such a reference doesn't exist, I'll be glad to hear an expert opinion on the historic significance of this formula (Gauss did publish this formula; thereby it's plausible that it did have influence).

• He gives an asymptotic for the number of genera, which is akin to giving an asymptotic for $\sum_{n\leq X} 2^{\omega(n)}$ —- hence the log. [Note that he says genera around $+D$ or $-D$, and $h(-D)$ is way bigger.] Let me know if I’ve misunderstood! – alpoge Jan 21 at 1:28
• Mmmh... Isn't art. 301 of the Disquisitiones a reference for this result of Gauß? – José Hdz. Stgo. Jan 21 at 5:35
• @JoséHdz.Stgo. --- I presume with "reference for this result of Gauss", the OP means "a reference which discusses this result of Gauss". – Carlo Beenakker Jan 21 at 7:56
• If I recall correctly there may be some information on this in Ayoub's book "Introduction to Analytic Number Theory". Having said this, I have not looked at this book for many years and I do not have easy access to a copy. – M. Khan Jan 21 at 16:42
• @CarloBeenakker: I wonder if the OP is aware of this previous question in MO: mathoverflow.net/a/109396/1593 – José Hdz. Stgo. Jan 22 at 5:05