Chinese remainder theorem (chinese_remainder)
The number that leaves given remainders on division by given moduli.
How to write it
chinese_remainder(remainders, moduli)
- remainders
- The remainders. Takes a list.
- moduli
- The moduli, in the same order. Takes a list.
Examples
chinese_remainder([2, 3], [3, 5])In the solver,
Open in the solverchinese_remainder([2, 3], [3, 5])gives8.
Related functions
- continued_fraction
The continued fraction of a rational number, as a list.
- catalan_number
The n-th Catalan number.
- convergents
The convergents of a continued fraction.
- carmichael_lambda
Carmichael function: the least power that takes every number coprime to n to 1 modulo n.
- discrete_log
The exponent that takes a base to a value modulo a number.
- bernoulli_b
The n-th Bernoulli number.