#### D.4.35.3 primRoot

Procedure from library `symodstd.lib` (see symodstd_lib).

Usage:
  primRoot(p,k); p,k integers

Assume:
  p is a prime and k divides p-1.

Return:
  int: a k-th primitive root of unity in Z/pZ

Example:

    LIB "symodstd.lib";
    primRoot(181,10);
    ==> 56
    ring R = 2147482801, x, lp;
    number a = primRoot(2147482801,5);
    a;
    ==> -159774741
    a^2;
    ==> 140354890
    a^3;
    ==> 260989846
    a^4;
    ==> -241569996
    a^5;
    ==> 1

User manual for Singular version 4.4.1, 2025, generated by texi2html.