I computed the following table of class number for
using the built-in PARI function qfbclassno(D,1).
Notice that there are just a few
s at the beginning and then no more.
![]() |
![]() |
3 | 1 |
7 | 1 |
11 | 1 |
15 | 2 |
19 | 1 |
23 | 3 |
27 | 1 |
31 | 3 |
35 | 2 |
39 | 4 |
43 | 1 |
47 | 5 |
51 | 2 |
55 | 4 |
59 | 3 |
63 | 4 |
67 | 1 |
71 | 7 |
75 | 2 |
79 | 5 |
83 | 3 |
87 | 6 |
91 | 2 |
95 | 8 |
99 | 2 |
103 | 5 |
107 | 3 |
111 | 8 |
115 | 2 |
119 | 10 |
![]() |
![]() |
123 | 2 |
127 | 5 |
131 | 5 |
135 | 6 |
139 | 3 |
143 | 10 |
147 | 2 |
151 | 7 |
155 | 4 |
159 | 10 |
163 | 1 |
167 | 11 |
171 | 4 |
175 | 6 |
179 | 5 |
183 | 8 |
187 | 2 |
191 | 13 |
195 | 4 |
199 | 9 |
203 | 4 |
207 | 6 |
211 | 3 |
215 | 14 |
219 | 4 |
223 | 7 |
227 | 5 |
231 | 12 |
235 | 2 |
239 | 15 |
![]() |
![]() |
243 | 3 |
247 | 6 |
251 | 7 |
255 | 12 |
259 | 4 |
263 | 13 |
267 | 2 |
271 | 11 |
275 | 4 |
279 | 12 |
283 | 3 |
287 | 14 |
291 | 4 |
295 | 8 |
299 | 8 |
303 | 10 |
307 | 3 |
311 | 19 |
315 | 4 |
319 | 10 |
323 | 4 |
327 | 12 |
331 | 3 |
335 | 18 |
339 | 6 |
343 | 7 |
347 | 5 |
351 | 12 |
355 | 4 |
359 | 19 |
![]() |
![]() |
363 | 4 |
367 | 9 |
371 | 8 |
375 | 10 |
379 | 3 |
383 | 17 |
387 | 4 |
391 | 14 |
395 | 8 |
399 | 16 |
403 | 2 |
407 | 16 |
411 | 6 |
415 | 10 |
419 | 9 |
423 | 10 |
427 | 2 |
431 | 21 |
435 | 4 |
439 | 15 |
443 | 5 |
447 | 14 |
451 | 6 |
455 | 20 |
459 | 6 |
463 | 7 |
467 | 7 |
471 | 16 |
475 | 4 |
479 | 25 |
![]() |
![]() |
483 | 4 |
487 | 7 |
491 | 9 |
495 | 16 |
499 | 3 |
503 | 21 |
507 | 4 |
511 | 14 |
515 | 6 |
519 | 18 |
523 | 5 |
527 | 18 |
531 | 6 |
535 | 14 |
539 | 8 |
543 | 12 |
547 | 3 |
551 | 26 |
555 | 4 |
559 | 16 |
563 | 9 |
567 | 12 |
571 | 5 |
575 | 18 |
579 | 8 |
583 | 8 |
587 | 7 |
591 | 22 |
595 | 4 |
599 | 25 |
![]() |
![]() |
603 | 4 |
607 | 13 |
611 | 10 |
615 | 20 |
619 | 5 |
623 | 22 |
627 | 4 |
631 | 13 |
635 | 10 |
639 | 14 |
643 | 3 |
647 | 23 |
651 | 8 |
655 | 12 |
659 | 11 |
663 | 16 |
667 | 4 |
671 | 30 |
675 | 6 |
679 | 18 |
683 | 5 |
687 | 12 |
691 | 5 |
695 | 24 |
699 | 10 |
703 | 14 |
707 | 6 |
711 | 20 |
715 | 4 |
719 | 31 |
![]() |
![]() |
723 | 4 |
727 | 13 |
731 | 12 |
735 | 16 |
739 | 5 |
743 | 21 |
747 | 6 |
751 | 15 |
755 | 12 |
759 | 24 |
763 | 4 |
767 | 22 |
771 | 6 |
775 | 12 |
779 | 10 |
783 | 18 |
787 | 5 |
791 | 32 |
795 | 4 |
799 | 16 |
803 | 10 |
807 | 14 |
811 | 7 |
815 | 30 |
819 | 8 |
823 | 9 |
827 | 7 |
831 | 28 |
835 | 6 |
839 | 33 |
We can compute these numbers using Proposition 2.1.
The following PARI program enumerates the primitive reduced
forms of discriminant .
{isreduced(a,b,c) = if(b^2-4*a*c>=0 || a<0, error("reduce: (a,b,c) must be positive definite.")); if(!(abs(b)<=a && a<=c), return(0)); if(abs(b)==a || a==c, return(b>=0)); return(1); } {reduce(f) = local(D, k, t, a,b,c); a=f[1]; b=f[2]; c=f[3]; D=b^2-4*a*c; if(D>=0 || a<0, error("reduce: (a,b,c) must be positive definite.")); while(!isreduced(a,b,c), \\ ! means ``not'' if(c<a, b = -b; t = a; a = c; c = t, \\ else if (abs(b)>a || -b==a, k = floor((a-b)/(2*a)); b = b+2*k*a; c = (b^2-D)/(4*a); ) ) ); return([a,b,c]) } {reducedforms(D)= local(bound, forms, b, r); if (D > 0 || D%4 == 2 || D%4==3, error("Invalid discriminant")); bound = floor(-D/3); forms = []; for(a = 1, bound, for(c = 1, bound, if(3*a*c<=-D && issquare(4*a*c+D), b = floor(sqrt(4*a*c+D)); r = reduce([a,b,c]); print1([a,b,c], " ----> ", r); if (gcd(r[1],gcd(r[2],r[3])) == 1, forms = setunion(forms,[r]); print(""), \\ else print (" \t(not primitive)") ) ) ) ); return(eval(forms)); \\ eval gets rid of the annoying quotes. }
For example, when the program finds exactly
reduced forms:
? D = -419 %21 = -419 ? qfbclassno(D,1) %22 = 9 ? reducedforms(D) [1, 1, 105] ----> [1, 1, 105] [1, 3, 107] ----> [1, 1, 105] [1, 5, 111] ----> [1, 1, 105] [1, 7, 117] ----> [1, 1, 105] [1, 9, 125] ----> [1, 1, 105] [1, 11, 135] ----> [1, 1, 105] [3, 1, 35] ----> [3, 1, 35] [3, 5, 37] ----> [3, -1, 35] [3, 7, 39] ----> [3, 1, 35] [3, 11, 45] ----> [3, -1, 35] [5, 1, 21] ----> [5, 1, 21] [5, 9, 25] ----> [5, -1, 21] [5, 11, 27] ----> [5, 1, 21] [7, 1, 15] ----> [7, 1, 15] [9, 7, 13] ----> [9, 7, 13] [9, 11, 15] ----> [9, -7, 13] [13, 7, 9] ----> [9, -7, 13] [15, 1, 7] ----> [7, -1, 15] [15, 11, 9] ----> [9, 7, 13] [21, 1, 5] ----> [5, -1, 21] [25, 9, 5] ----> [5, 1, 21] [27, 11, 5] ----> [5, -1, 21] [35, 1, 3] ----> [3, -1, 35] [37, 5, 3] ----> [3, 1, 35] [39, 7, 3] ----> [3, -1, 35] [45, 11, 3] ----> [3, 1, 35] [105, 1, 1] ----> [1, 1, 105] [107, 3, 1] ----> [1, 1, 105] [111, 5, 1] ----> [1, 1, 105] [117, 7, 1] ----> [1, 1, 105] [125, 9, 1] ----> [1, 1, 105] [135, 11, 1] ----> [1, 1, 105] %23 = [[1, 1, 105], [3, -1, 35], [3, 1, 35], [5, -1, 21], [5, 1, 21], [7, -1, 15], [7, 1, 15], [9, -7, 13], [9, 7, 13]] ? length(%23) %24 = 9