FLINT3.7.0-dev

dirichlet_chi_vec_loop, dirichlet_chi_vec_loop_order

Synopsis#include <flint/dirichlet.h>
void dirichlet_chi_vec_loop(ulong * v, const dirichlet_group_t G, const dirichlet_char_t chi, slong nv)source
void dirichlet_chi_vec_loop_order(ulong * v, const dirichlet_group_t G, const dirichlet_char_t chi, ulong order, slong nv)source

As dirichlet_chi_vec, by enumerating the whole group with dirichlet_char_next and updating the value by one addition per step; entries k \ge q are copied by periodicity. Costs O(\varphi(q) + \mathit{nv}) and needs no discrete logarithm. Requires \mathit{nv} \ge 2: the function writes v[1].

Cite this page

The FLINT team, “dirichlet_chi_vec_loop, dirichlet_chi_vec_loop_order (dirichlet.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/dirichlet/dirichlet_chi_vec_loop.html (generated 2026-10-20).