fmpq_poly_legendre_p
Synopsis
#include <flint/fmpq_poly.h>void fmpq_poly_legendre_p(fmpq_poly_t poly, ulong n)sourceSets poly to the Legendre polynomial P_n(x), defined by (n+1) P_{n+1}(x) = (2n+1) x P_n(x) - n P_{n-1}(x), for n\ge0. The coefficients are calculated using a hypergeometric recurrence in integer arithmetic. The denominator is given by \gcd(n!,2^n) = 2^{\lfloor n/2 \rfloor + \lfloor n/4 \rfloor + \ldots}. See fmpz_poly for the shifted Legendre polynomials.
Cite this page
The FLINT team, “fmpq_poly_legendre_p (fmpq_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_poly/fmpq_poly_legendre_p.html (generated 2026-10-20).
@misc{flint-doc-fmpq-poly-fmpq-poly-legendre-p,
author = {{The FLINT team}},
title = {{fmpq\_poly\_legendre\_p (fmpq\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq_poly/fmpq_poly_legendre_p.html},
note = {Generated 2026-10-20}
}