solve_congruence function
Solve a congruence for a variable.
How to write it
solve_congruence(equation, x, m)
- equation
- The congruence to solve. Takes an equation.
- x
- The variable to solve for. Takes a variable.
- m
- The modulus. Takes a whole number.
Examples
solve_congruence(3 x = 1, x, 7)In the solver,
Open in the solversolve_congruence(3 x = 1, x, 7)gives[x = 5 + 7C(1)].
Related functions
- squares_r
How many ways a whole number is a sum of a given count of squares, counting order and signs.
- primitive_root
A primitive root of a prime: a number whose powers cover all the nonzero residues.
- stirling_s1
Stirling number of the first kind, with sign.
- prime_pi
How many primes are at most a number.
- stirling_s2
Stirling number of the second kind: the ways to split n items into k groups.
- prime_omega
How many primes divide a whole number, counted with multiplicity.