Wolfram Researchfunctions.wolfram.comOther Wolfram Sites
Search Site
Function CategoriesGraphics GalleryNotationsGeneral IdentitiesAbout This Site ContributeEmail CommentsSign the Guestbook

View Related Information In
The Documentation Center
MathWorld

Download All Formulas For This Function
Mathematica Notebook
PDF File

Download All Introductions For This Function
Mathematica Notebook
PDF File

 

Developed with Mathematica -- Download a Free Trial Version
 











ExtendedGCD






Mathematica Notation

Traditional Notation









Integer Functions > ExtendedGCD[n1,n2,...,nm] > Primary definition





http://functions.wolfram.com/04.09.02.0001.02









  


  










Input Form





ExtendedGCD[Subscript[n, 1], Subscript[n, 2], \[Ellipsis], Subscript[n, m]] == {GCD[Subscript[n, 1], Subscript[n, 2], \[Ellipsis], Subscript[n, m]], {Subscript[r, 1], Subscript[r, 2], \[Ellipsis], Subscript[r, m]}} /; GCD[Subscript[n, 1], Subscript[n, 2], \[Ellipsis], Subscript[n, m]] == Subscript[n, 1] Subscript[r, 1] + Subscript[n, 2] Subscript[r, 2] + \[Ellipsis] + Subscript[n, m] Subscript[r, m] && Element[Re[Subscript[n, k]], Integers] && Element[Im[Subscript[n, k]], Integers] && Element[Re[Subscript[r, k]], Integers] && Element[Im[Subscript[r, k]], Integers] && 1 <= k <= m










Standard Form





Cell[BoxData[RowBox[List[RowBox[List[RowBox[List["ExtendedGCD", "[", RowBox[List[SubscriptBox["n", "1"], ",", SubscriptBox["n", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["n", "m"]]], "]"]], "\[Equal]", RowBox[List["{", RowBox[List[RowBox[List["GCD", "[", RowBox[List[SubscriptBox["n", "1"], ",", SubscriptBox["n", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["n", "m"]]], "]"]], ",", RowBox[List["{", RowBox[List[SubscriptBox["r", "1"], ",", SubscriptBox["r", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["r", "m"]]], "}"]]]], "}"]]]], "/;", RowBox[List[RowBox[List[RowBox[List["GCD", "[", RowBox[List[SubscriptBox["n", "1"], ",", SubscriptBox["n", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["n", "m"]]], "]"]], "\[Equal]", RowBox[List[RowBox[List[SubscriptBox["n", "1"], " ", SubscriptBox["r", "1"]]], "+", RowBox[List[SubscriptBox["n", "2"], SubscriptBox["r", "2"]]], "+", "\[Ellipsis]", "+", RowBox[List[SubscriptBox["n", "m"], SubscriptBox["r", "m"]]]]]]], "\[And]", RowBox[List[RowBox[List["Re", "[", SubscriptBox["n", "k"], "]"]], "\[Element]", "Integers"]], "\[And]", RowBox[List[RowBox[List["Im", "[", SubscriptBox["n", "k"], "]"]], "\[Element]", "Integers"]], "\[And]", RowBox[List[RowBox[List["Re", "[", SubscriptBox["r", "k"], "]"]], "\[Element]", "Integers"]], "\[And]", RowBox[List[RowBox[List["Im", "[", SubscriptBox["r", "k"], "]"]], "\[Element]", "Integers"]], "\[And]", RowBox[List["1", "\[LessEqual]", "k", "\[LessEqual]", "m"]]]]]]]]










MathML Form







<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='TraditionalForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <semantics> <mrow> <mrow> <mrow> <mi> egcd </mi> <mo> &#8289; </mo> <mo> ( </mo> <mrow> <msub> <mi> n </mi> <mn> 1 </mn> </msub> <mo> , </mo> <msub> <mi> n </mi> <mn> 2 </mn> </msub> <mo> , </mo> <mo> &#8230; </mo> <mo> , </mo> <msub> <mi> n </mi> <mi> m </mi> </msub> </mrow> <mo> ) </mo> </mrow> <mo> &#10869; </mo> <mrow> <mo> { </mo> <mrow> <mrow> <mi> gcd </mi> <mo> &#8289; </mo> <mo> ( </mo> <mrow> <msub> <mi> n </mi> <mn> 1 </mn> </msub> <mo> , </mo> <msub> <mi> n </mi> <mn> 2 </mn> </msub> <mo> , </mo> <mo> &#8230; </mo> <mo> , </mo> <msub> <mi> n </mi> <mi> m </mi> </msub> </mrow> <mo> ) </mo> </mrow> <mo> , </mo> <mrow> <mo> { </mo> <mrow> <msub> <mi> r </mi> <mn> 1 </mn> </msub> <mo> , </mo> <msub> <mi> r </mi> <mn> 2 </mn> </msub> <mo> , </mo> <mo> &#8230; </mo> <mo> , </mo> <msub> <mi> r </mi> <mi> m </mi> </msub> </mrow> <mo> } </mo> </mrow> </mrow> <mo> } </mo> </mrow> </mrow> <mo> /; </mo> <mrow> <mrow> <mrow> <mi> gcd </mi> <mo> &#8289; </mo> <mo> ( </mo> <mrow> <msub> <mi> n </mi> <mn> 1 </mn> </msub> <mo> , </mo> <msub> <mi> n </mi> <mn> 2 </mn> </msub> <mo> , </mo> <mo> &#8230; </mo> <mo> , </mo> <msub> <mi> n </mi> <mi> m </mi> </msub> </mrow> <mo> ) </mo> </mrow> <mo> &#10869; </mo> <mrow> <mrow> <msub> <mi> n </mi> <mn> 1 </mn> </msub> <mo> &#8290; </mo> <msub> <mi> r </mi> <mn> 1 </mn> </msub> </mrow> <mo> + </mo> <mrow> <msub> <mi> n </mi> <mn> 2 </mn> </msub> <mo> &#8290; </mo> <msub> <mi> r </mi> <mn> 2 </mn> </msub> </mrow> <mo> + </mo> <mo> &#8230; </mo> <mo> + </mo> <mrow> <msub> <mi> n </mi> <mi> m </mi> </msub> <mo> &#8290; </mo> <msub> <mi> r </mi> <mi> m </mi> </msub> </mrow> </mrow> </mrow> <mo> &#8743; </mo> <mrow> <mrow> <mi> Re </mi> <mo> &#8290; </mo> <mrow> <mo> ( </mo> <msub> <mi> n </mi> <mi> k </mi> </msub> <mo> ) </mo> </mrow> </mrow> <mo> &#8712; </mo> <semantics> <mi> &#8484; </mi> <annotation encoding='Mathematica'> TagBox[&quot;\[DoubleStruckCapitalZ]&quot;, Function[List[], Integers]] </annotation> </semantics> </mrow> <mo> &#8743; </mo> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <msub> <mi> n </mi> <mi> k </mi> </msub> <mo> ) </mo> </mrow> <mo> &#8712; </mo> <semantics> <mi> &#8484; </mi> <annotation encoding='Mathematica'> TagBox[&quot;\[DoubleStruckCapitalZ]&quot;, Function[List[], Integers]] </annotation> </semantics> </mrow> <mo> &#8743; </mo> <mrow> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <msub> <mi> r </mi> <mi> k </mi> </msub> <mo> ) </mo> </mrow> <mo> &#8712; </mo> <semantics> <mi> &#8484; </mi> <annotation encoding='Mathematica'> TagBox[&quot;\[DoubleStruckCapitalZ]&quot;, Function[List[], Integers]] </annotation> </semantics> </mrow> <mo> &#8743; </mo> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <msub> <mi> r </mi> <mi> k </mi> </msub> <mo> ) </mo> </mrow> <mo> &#8712; </mo> <semantics> <mi> &#8484; </mi> <annotation encoding='Mathematica'> TagBox[&quot;\[DoubleStruckCapitalZ]&quot;, Function[List[], Integers]] </annotation> </semantics> </mrow> <mo> &#8743; </mo> <mrow> <mn> 1 </mn> <mo> &#8804; </mo> <mi> k </mi> <mo> &#8804; </mo> <mi> m </mi> </mrow> </mrow> </mrow> <annotation-xml encoding='MathML-Content'> <apply> <ci> Condition </ci> <apply> <eq /> <apply> <ci> egcd </ci> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 1 </cn> </apply> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 2 </cn> </apply> <ci> &#8230; </ci> <apply> <ci> Subscript </ci> <ci> n </ci> <ci> m </ci> </apply> </apply> <list> <apply> <gcd /> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 1 </cn> </apply> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 2 </cn> </apply> <ci> &#8230; </ci> <apply> <ci> Subscript </ci> <ci> n </ci> <ci> m </ci> </apply> </apply> <list> <apply> <ci> Subscript </ci> <ci> r </ci> <cn type='integer'> 1 </cn> </apply> <apply> <ci> Subscript </ci> <ci> r </ci> <cn type='integer'> 2 </cn> </apply> <ci> &#8230; </ci> <apply> <ci> Subscript </ci> <ci> r </ci> <ci> m </ci> </apply> </list> </list> </apply> <apply> <and /> <apply> <eq /> <apply> <gcd /> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 1 </cn> </apply> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 2 </cn> </apply> <ci> &#8230; </ci> <apply> <ci> Subscript </ci> <ci> n </ci> <ci> m </ci> </apply> </apply> <apply> <plus /> <apply> <times /> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 1 </cn> </apply> <apply> <ci> Subscript </ci> <ci> r </ci> <cn type='integer'> 1 </cn> </apply> </apply> <apply> <times /> <apply> <ci> Subscript </ci> <ci> n </ci> <cn type='integer'> 2 </cn> </apply> <apply> <ci> Subscript </ci> <ci> r </ci> <cn type='integer'> 2 </cn> </apply> </apply> <ci> &#8230; </ci> <apply> <times /> <apply> <ci> Subscript </ci> <ci> n </ci> <ci> m </ci> </apply> <apply> <ci> Subscript </ci> <ci> r </ci> <ci> m </ci> </apply> </apply> </apply> </apply> <apply> <in /> <apply> <times /> <real /> <apply> <ci> Subscript </ci> <ci> n </ci> <ci> k </ci> </apply> </apply> <integers /> </apply> <apply> <in /> <apply> <imaginary /> <apply> <ci> Subscript </ci> <ci> n </ci> <ci> k </ci> </apply> </apply> <integers /> </apply> <apply> <in /> <apply> <real /> <apply> <ci> Subscript </ci> <ci> r </ci> <ci> k </ci> </apply> </apply> <integers /> </apply> <apply> <in /> <apply> <imaginary /> <apply> <ci> Subscript </ci> <ci> r </ci> <ci> k </ci> </apply> </apply> <integers /> </apply> <apply> <leq /> <cn type='integer'> 1 </cn> <ci> k </ci> <ci> m </ci> </apply> </apply> </apply> </annotation-xml> </semantics> </math>










Rule Form





Cell[BoxData[RowBox[List[RowBox[List["HoldPattern", "[", RowBox[List["ExtendedGCD", "[", RowBox[List[SubscriptBox["n_", "1"], ",", SubscriptBox["n_", "2"], ",", "\[Ellipsis]_", ",", SubscriptBox["n_", "m_"]]], "]"]], "]"]], "\[RuleDelayed]", RowBox[List[RowBox[List["{", RowBox[List[RowBox[List["GCD", "[", RowBox[List[SubscriptBox["nn", "1"], ",", SubscriptBox["nn", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["nn", "m"]]], "]"]], ",", RowBox[List["{", RowBox[List[SubscriptBox["r", "1"], ",", SubscriptBox["r", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["r", "m"]]], "}"]]]], "}"]], "/;", RowBox[List[RowBox[List[RowBox[List["GCD", "[", RowBox[List[SubscriptBox["nn", "1"], ",", SubscriptBox["nn", "2"], ",", "\[Ellipsis]", ",", SubscriptBox["nn", "m"]]], "]"]], "\[Equal]", RowBox[List[RowBox[List[SubscriptBox["nn", "1"], " ", SubscriptBox["r", "1"]]], "+", RowBox[List[SubscriptBox["nn", "2"], " ", SubscriptBox["r", "2"]]], "+", "\[Ellipsis]", "+", RowBox[List[SubscriptBox["nn", "m"], " ", SubscriptBox["r", "m"]]]]]]], "&&", RowBox[List[RowBox[List["Re", "[", SubscriptBox["n", "k"], "]"]], "\[Element]", "Integers"]], "&&", RowBox[List[RowBox[List["Im", "[", SubscriptBox["n", "k"], "]"]], "\[Element]", "Integers"]], "&&", RowBox[List[RowBox[List["Re", "[", SubscriptBox["r", "k"], "]"]], "\[Element]", "Integers"]], "&&", RowBox[List[RowBox[List["Im", "[", SubscriptBox["r", "k"], "]"]], "\[Element]", "Integers"]], "&&", RowBox[List["1", "\[LessEqual]", "k", "\[LessEqual]", "m"]]]]]]]]]]










Date Added to functions.wolfram.com (modification date)





2001-10-29





© 1998- Wolfram Research, Inc.