English

Artificial Intelligence in Number Theory: LLMs for Algorithm Generation and Ensemble Methods for Conjecture Verification

Number Theory 2026-05-12 v3 Artificial Intelligence

Abstract

This paper presents two concrete applications of Artificial Intelligence to algorithmic and analytic number theory. Recent benchmarks of large language models have mainly focused on general mathematics problems and the currently infeasible objective of automated theorem proving. In the first part of this paper, we relax our ambition and focus on a more specialized domain: we evaluate the performance of the state-of-the-art open-source large language model Qwen2.5-Math-7B-Instruct on algorithmic and computational tasks in algorithmic number theory. On a benchmark of thirty algorithmic problems and thirty computational questions taken from classical number-theoretic textbooks and Math StackExchange, the model achieves at least 0.95 accuracy (relative to the true answer) on every problem or question when given an optimal non-spoiling hint. The second part of the paper empirically verifies a folklore conjecture in analytic number theory stating that the modulus qq of a Dirichlet character χ\chi is uniquely determined by the initial nontrivial zeros {ρ1,,ρk}\{\rho_1,\dots,\rho_k\} (for some kNk\in\mathbb{N}) of the corresponding Dirichlet LL-function L(s,χ)L(s,\chi). We train a LightGBM multiclass classifier to predict the conductor qq for 214 randomly chosen Dirichlet LL-functions from a vector of statistical features of their initial zeros (moments, finite-difference statistics, FFT magnitudes, etc.). The model empirically verifies the conjecture for small qq, achieving at least 93.9\% test accuracy when sufficient statistical properties of the zeros are incorporated. For the second part of the paper, code and dataset are available.

Cite

@article{arxiv.2504.19451,
  title  = {Artificial Intelligence in Number Theory: LLMs for Algorithm Generation and Ensemble Methods for Conjecture Verification},
  author = {Ali Saraeb},
  journal= {arXiv preprint arXiv:2504.19451},
  year   = {2026}
}
R2 v1 2026-06-28T23:13:14.522Z