numtheory(deprecated)
migcdex
compute solutions to the modulo N extended GCD problem
Calling Sequence
Parameters
Description
Examples
migcdex(N, a, b1, b2, ..., bn)
N
-
positive integer
a
integer
b1, b2, ..., bn
integers
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[ModExtendedGCD] instead.
The function migcdex computes a solution to the modulo N greatest common divisor problem for an arbitrary number of integers.
The return value is the sequence c1,c2,...,cn of non-negative integers with
gcd⁡N,a,b1,...,bn=gcd⁡N,a+c1⁢b1+...+cn⁢bn
such that cn,...,c2,c1 is lexicographically minimal among all such sequences.
with⁡numtheory:
migcdex⁡150,0
migcdex⁡150,5,75,25
0,0
migcdex⁡150,9,75,25
1,1
See Also
igcdex
NumberTheory[ModExtendedGCD]
Download Help Document