Two integral binary quadratic forms are properly equivalent when one is obtained from the other by a change of variables in . For a negative discriminant , the class number of binary quadratic forms is the number of proper equivalence classes of primitive positive-definite forms of discriminant .
If properly represents , then for coprime . Extend to a matrix in ; after the associated variable change, the coefficient of is , so the transformed form isThe converse follows by evaluating this form at .
Such a form has discriminant precisely whenso it exists exactly when . Thus is properly represented by some form of discriminant exactly when is a square modulo .
Now let . If is composite for , it has a prime divisor , andConversely, if is a square modulo for a prime , choose an odd square root with . Then and , so that value is composite.
Finally, reduction theory says that every nonprincipal positive-definite class of discriminant has a reduced representative whose leading coefficient has a prime divisor for which is a square modulo . Conversely such a prime produces a represented form not equivalent to the principal form . Combining this with the preceding equivalence gives
Solved by gpt-5.6-sol high.
Codex Wiki