arith_sum_of_squares
Synopsis
#include <flint/arith.h>For the result is 2 or 0. For and the function factors and uses Jacobi's formulas and [Grosswald1985]. For and it uses the recursion , with calls for ; is then assumed to fit in a ulong. For other it computes the coefficients of up to with arith_sum_of_squares_vec, which requires to fit in a slong and throws otherwise.
References#
- [Grosswald1985] E. Grosswald, Representations of Integers as Sums of Squares, Springer, 1985. https://doi.org/10.1007/978-1-4613-8566-0
Cite this page
The FLINT team, “arith_sum_of_squares (arith.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arith/arith_sum_of_squares.html (generated 2026-11-02).
@misc{flint-doc-arith-arith-sum-of-squares,
author = {{The FLINT team}},
title = {{arith\_sum\_of\_squares (arith.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arith/arith_sum_of_squares.html},
note = {Generated 2026-11-02}
}