|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://functions.wolfram.com/04.08.06.0002.01
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GCD[m, n] == 1 - 2 Floor[m/2] Floor[n/2] - KroneckerDelta[m/2 - Floor[m/2]]
KroneckerDelta[n/2 - Floor[n/2]] +
2 Sum[Floor[(k n)/m], {k, 1, Floor[m/2]}] +
2 Sum[Floor[(k m)/n], {k, 1, Floor[n/2]}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cell[BoxData[RowBox[List[RowBox[List["GCD", "[", RowBox[List["m", ",", "n"]], "]"]], "\[Equal]", RowBox[List["1", "-", RowBox[List["2", " ", RowBox[List["Floor", "[", FractionBox["m", "2"], "]"]], " ", RowBox[List["Floor", "[", FractionBox["n", "2"], "]"]]]], "-", RowBox[List[RowBox[List["KroneckerDelta", "[", RowBox[List[FractionBox["m", "2"], "-", RowBox[List["Floor", "[", FractionBox["m", "2"], "]"]]]], "]"]], RowBox[List["KroneckerDelta", "[", RowBox[List[FractionBox["n", "2"], "-", RowBox[List["Floor", "[", FractionBox["n", "2"], "]"]]]], "]"]]]], "+", RowBox[List["2", " ", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], RowBox[List["Floor", "[", FractionBox["m", "2"], "]"]]], RowBox[List["Floor", "[", FractionBox[RowBox[List["k", " ", "n"]], "m"], "]"]]]]]], "+", RowBox[List["2", " ", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], RowBox[List["Floor", "[", FractionBox["n", "2"], "]"]]], RowBox[List["Floor", "[", FractionBox[RowBox[List["k", " ", "m"]], "n"], "]"]]]]]]]]]]]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='TraditionalForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <semantics> <mrow> <mrow> <mi> gcd </mi> <mo> ⁡ </mo> <mo> ( </mo> <mrow> <mi> m </mi> <mo> , </mo> <mi> n </mi> </mrow> <mo> ) </mo> </mrow> <mo> ⩵ </mo> <mrow> <mn> 1 </mn> <mo> - </mo> <mrow> <mn> 2 </mn> <mo> ⁢ </mo> <mrow> <mo> ⌊ </mo> <mfrac> <mi> m </mi> <mn> 2 </mn> </mfrac> <mo> ⌋ </mo> </mrow> <mo> ⁢ </mo> <mrow> <mo> ⌊ </mo> <mfrac> <mi> n </mi> <mn> 2 </mn> </mfrac> <mo> ⌋ </mo> </mrow> </mrow> <mo> - </mo> <mrow> <msub> <semantics> <mi> δ </mi> <annotation-xml encoding='MathML-Content'> <ci> KroneckerDelta </ci> </annotation-xml> </semantics> <mrow> <mfrac> <mi> m </mi> <mn> 2 </mn> </mfrac> <mo> - </mo> <mrow> <mo> ⌊ </mo> <mfrac> <mi> m </mi> <mn> 2 </mn> </mfrac> <mo> ⌋ </mo> </mrow> </mrow> </msub> <mo> ⁢ </mo> <msub> <semantics> <mi> δ </mi> <annotation-xml encoding='MathML-Content'> <ci> KroneckerDelta </ci> </annotation-xml> </semantics> <mrow> <mfrac> <mi> n </mi> <mn> 2 </mn> </mfrac> <mo> - </mo> <mrow> <mo> ⌊ </mo> <mfrac> <mi> n </mi> <mn> 2 </mn> </mfrac> <mo> ⌋ </mo> </mrow> </mrow> </msub> </mrow> <mo> + </mo> <mrow> <mn> 2 </mn> <mo> ⁢ </mo> <mrow> <munderover> <mo> ∑ </mo> <mrow> <mi> k </mi> <mo> = </mo> <mn> 1 </mn> </mrow> <mrow> <mo> ⌊ </mo> <mfrac> <mi> m </mi> <mn> 2 </mn> </mfrac> <mo> ⌋ </mo> </mrow> </munderover> <mrow> <mo> ⌊ </mo> <mfrac> <mrow> <mi> k </mi> <mo> ⁢ </mo> <mi> n </mi> </mrow> <mi> m </mi> </mfrac> <mo> ⌋ </mo> </mrow> </mrow> </mrow> <mo> + </mo> <mrow> <mn> 2 </mn> <mo> ⁢ </mo> <mrow> <munderover> <mo> ∑ </mo> <mrow> <mi> k </mi> <mo> = </mo> <mn> 1 </mn> </mrow> <mrow> <mo> ⌊ </mo> <mfrac> <mi> n </mi> <mn> 2 </mn> </mfrac> <mo> ⌋ </mo> </mrow> </munderover> <mrow> <mo> ⌊ </mo> <mfrac> <mrow> <mi> k </mi> <mo> ⁢ </mo> <mi> m </mi> </mrow> <mi> n </mi> </mfrac> <mo> ⌋ </mo> </mrow> </mrow> </mrow> </mrow> </mrow> <annotation-xml encoding='MathML-Content'> <apply> <eq /> <apply> <gcd /> <ci> m </ci> <ci> n </ci> </apply> <apply> <plus /> <cn type='integer'> 1 </cn> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <cn type='integer'> 2 </cn> <apply> <floor /> <apply> <times /> <ci> m </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> </apply> <apply> <floor /> <apply> <times /> <ci> n </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <apply> <ci> KroneckerDelta </ci> <apply> <plus /> <apply> <times /> <ci> m </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <floor /> <apply> <times /> <ci> m </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </apply> </apply> </apply> <apply> <ci> KroneckerDelta </ci> <apply> <plus /> <apply> <times /> <ci> n </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <floor /> <apply> <times /> <ci> n </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </apply> </apply> </apply> </apply> </apply> <apply> <times /> <cn type='integer'> 2 </cn> <apply> <sum /> <bvar> <ci> k </ci> </bvar> <lowlimit> <cn type='integer'> 1 </cn> </lowlimit> <uplimit> <apply> <floor /> <apply> <times /> <ci> m </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </uplimit> <apply> <floor /> <apply> <times /> <ci> k </ci> <ci> n </ci> <apply> <power /> <ci> m </ci> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </apply> </apply> <apply> <times /> <cn type='integer'> 2 </cn> <apply> <sum /> <bvar> <ci> k </ci> </bvar> <lowlimit> <cn type='integer'> 1 </cn> </lowlimit> <uplimit> <apply> <floor /> <apply> <times /> <ci> n </ci> <apply> <power /> <cn type='integer'> 2 </cn> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </uplimit> <apply> <floor /> <apply> <times /> <ci> k </ci> <ci> m </ci> <apply> <power /> <ci> n </ci> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </apply> </apply> </apply> </apply> </annotation-xml> </semantics> </math>
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
| Cell[BoxData[RowBox[List[RowBox[List["HoldPattern", "[", RowBox[List["GCD", "[", RowBox[List["m_", ",", "n_"]], "]"]], "]"]], "\[RuleDelayed]", RowBox[List["1", "-", RowBox[List["2", " ", RowBox[List["Floor", "[", FractionBox["m", "2"], "]"]], " ", RowBox[List["Floor", "[", FractionBox["n", "2"], "]"]]]], "-", RowBox[List[RowBox[List["KroneckerDelta", "[", RowBox[List[FractionBox["m", "2"], "-", RowBox[List["Floor", "[", FractionBox["m", "2"], "]"]]]], "]"]], " ", RowBox[List["KroneckerDelta", "[", RowBox[List[FractionBox["n", "2"], "-", RowBox[List["Floor", "[", FractionBox["n", "2"], "]"]]]], "]"]]]], "+", RowBox[List["2", " ", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], RowBox[List["Floor", "[", FractionBox["m", "2"], "]"]]], RowBox[List["Floor", "[", FractionBox[RowBox[List["k", " ", "n"]], "m"], "]"]]]]]], "+", RowBox[List["2", " ", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], RowBox[List["Floor", "[", FractionBox["n", "2"], "]"]]], RowBox[List["Floor", "[", FractionBox[RowBox[List["k", " ", "m"]], "n"], "]"]]]]]]]]]]]] |
|
|
|
|
|
|
|
|
|
|
Date Added to functions.wolfram.com (modification date)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|