Primitive root modulo n (primitive_root)
A primitive root of a prime: a number whose powers cover all the nonzero residues.
How to write it
primitive_root(p)
- p
- A prime. Takes a whole number.
Examples
primitive_root(7)In the solver,
Open in the solverprimitive_root(7)gives3.
Related functions
- solve_congruence
Solve a congruence for a variable.
- prime_pi
How many primes are at most a number.
- squares_r
How many ways a whole number is a sum of a given count of squares, counting order and signs.
- prime_omega
How many primes divide a whole number, counted with multiplicity.
- stirling_s1
Stirling number of the first kind, with sign.
- prime_nu
How many distinct primes divide a whole number.