Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Extended Euclidean algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==The case of more than two numbers == One can handle the case of more than two numbers iteratively. First we show that <math>\gcd(a,b,c) = \gcd(\gcd(a,b),c)</math>. To prove this let <math>d=\gcd(a,b,c)</math>. By definition of gcd <math>d</math> is a divisor of <math>a</math> and <math>b</math>. Thus <math>\gcd(a,b)=k d</math> for some <math>k</math>. Similarly <math>d</math> is a divisor of <math>c</math> so <math>c=jd</math> for some <math>j</math>. Let <math>u=\gcd(k,j)</math>. By our construction of <math>u</math>, <math>ud | a,b,c</math> but since <math>d</math> is the greatest divisor <math>u</math> is a [[Unit (ring theory)|unit]]. And since <math>ud=\gcd(\gcd(a,b),c)</math> the result is proven. So if <math>na + mb = \gcd(a,b)</math> then there are <math>x</math> and <math>y</math> such that <math>x\gcd(a,b) + yc = \gcd(a,b,c)</math> so the final equation will be : <math>x(na + mb) + yc = (xn)a + (xm)b + yc = \gcd(a,b,c).\,</math> So then to apply to ''n'' numbers we use induction :<math>\gcd(a_1,a_2,\dots,a_n) =\gcd(a_1,\, \gcd(a_2,\, \gcd(a_3,\dots, \gcd(a_{n-1}\,,a_n))),\dots),</math> with the equations following directly.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)