MDC de Múltiplos Números
Calcula MDC de uma lista de inteiros (separados por vírgula).
MDC
—
GCD of multiple numbers: formula and example
For more than two numbers, the greatest common divisor falls out of associativity. You compute gcd(a,b,c,…) = gcd(gcd(a,b), c, …), folding the list one pair at a time. Each pair runs through the Euclidean algorithm, where gcd(a,b) = gcd(b, a mod b) repeats until the remainder hits zero. Take gcd(60, 48, 36) = gcd(gcd(60, 48), 36) = gcd(12, 36) = 12. A few facts worth keeping in mind: gcd is commutative and associative, gcd(a, 0) = a, and the gcd of any set divides every integer linear combination of its elements, which is what Bézout tells us.
Applications: fractions, scaling and team partitioning
The GCD does the work behind reducing fractions with multiple terms. It scales a recipe down when you divide every ingredient by the shared divisor. It also tells you how to split tasks or items into equal groups — the largest group size that divides each count cleanly. In linear algebra it reduces vectors, and in cryptography it sits under modular inverses, since RSA key generation needs gcd(e, φ(n)) = 1.
FAQ
Does the order of inputs matter? It doesn't. Since gcd is associative and commutative, gcd(a,b,c) = gcd(c,a,b) = gcd(b,c,a) all the same.
What if one number is 0? Because gcd(a, 0) = a, a zero in the list leaves the result untouched. The exception is when every number is 0, which has no defined gcd.
What about negative numbers? Convention keeps the gcd non-negative, so we work with absolute values: gcd(a,b) = gcd(|a|,|b|).
Relation to LCM? With two numbers, lcm(a,b) = |a·b| / gcd(a,b). For longer lists you just apply that step by step.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.