dirichlet_group_init
#include <flint/dirichlet.h>int dirichlet_group_init(dirichlet_group_t G, ulong q)sourceInitialises as the group of characters modulo , computing the factorisation of , the Conrey generators and the exponent. No discrete logarithm tables are computed, so this is cheap even for large . Returns 1 on success, and 0 (without allocating) if a prime factor of exceeds , for which the generator is not implemented.
For an odd prime the Conrey generator is the smallest positive integer that is a primitive root modulo , hence modulo every . It equals the smallest primitive root modulo except for and , the only such primes below . For divisible by 8, the components for the 2-part are generated by and ; for by ; for there is no component.
Guides#
The FLINT team, “dirichlet_group_init (dirichlet.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/dirichlet/dirichlet_group_init.html (generated 2026-11-02).
@misc{flint-doc-dirichlet-dirichlet-group-init,
author = {{The FLINT team}},
title = {{dirichlet\_group\_init (dirichlet.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/dirichlet/dirichlet_group_init.html},
note = {Generated 2026-11-02}
}