← All projects

Mathematics

Primes and quadratic forms

Python tools that accompany our math comps paper, including reduction, enumeration, and composition of binary quadratic forms.

Collaborative mathematics comps project

PythonNumber theoryComputational mathematics

The question

How can computation help us explore binary quadratic forms and the ideas in our paper, Primes and Quadratic Forms?

What we did

  • Implemented routines to reduce binary quadratic forms and list reduced forms of a given negative discriminant.
  • Included checks for fundamental discriminants and tools for enumerating forms across a range of discriminants.
  • Computed Dirichlet composition and supplied examples that call the routines.

Results & discussion

The code gives readers a way to work through concrete examples alongside the paper, including the reduced forms for a discriminant and the results of composing forms.

Limitations

The routines focus on the examples in our mathematics paper. The repository does not include large-input benchmarks.

Paper and accompanying code: Sophie Boileau, Alejandro González Argüelles, Grace Hanson, Ammy Lin, and Hugh Shanno. This repository is a fork of the collaborative comps project.

For the code and full project details, see the project repository.