An integer
is a fundamental discriminant if it is not equal to 1, not divisible
by any square of any odd prime, and satisfies or . The function FundamentalDiscriminantQ[d]
in the Wolfram Language version 5.2
add-on package NumberTheory`NumberTheoryFunctions` tests if an integer
is a fundamental discriminant.
The first few positive fundamental discriminants are 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, ... (OEIS A003658). Similarly, the
first few negative fundamental discriminants are , , , , , , , , , , , ... (OEIS A003657).