(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.1' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 11568, 342] NotebookOptionsPosition[ 8878, 268] NotebookOutlinePosition[ 9253, 285] CellTagsIndexPosition[ 9210, 282] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Moebius Transform", "Title",ExpressionUUID->"81117ff4-cd9b-4fbb-ad3a-51455b648cfd"], Cell[CellGroupData[{ Cell["Author", "Subsection",ExpressionUUID->"78d153d8-da32-462d-b502-b120009e9cd7"], Cell["\<\ Eric W. Weisstein May 8, 2008\ \>", "Text",ExpressionUUID->"19c323ef-ca42-49fe-aea7-11e1c875d25c"], Cell[TextData[{ "This notebook downloaded from ", ButtonBox["http://mathworld.wolfram.com/notebooks/Combinatorics/\ MoebiusTransform.nb", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://mathworld.wolfram.com/notebooks/Combinatorics/\ MoebiusTransform.nb"], None}], "." }], "Text",ExpressionUUID->"b1f8df44-ff55-4eb1-bdd0-77993857f388"], Cell[TextData[{ "For more information, see Eric's ", StyleBox["MathWorld", FontSlant->"Italic"], " entry ", ButtonBox["http://mathworld.wolfram.com/MoebiusTransform.html", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://mathworld.wolfram.com/MoebiusTransform.html"], None}], "." }], "Text",ExpressionUUID->"a96a9c1c-3bcb-4882-96cc-e4ee6b01afd8"], Cell["\<\ \[Copyright]2008 Wolfram Research, Inc. except for portions noted otherwise\ \>", "Text",ExpressionUUID->"034b19e0-81e9-47ff-ab76-f7e4b4053e46"] }, Open ]], Cell[CellGroupData[{ Cell["Examples", "Section",ExpressionUUID->"9647d2f5-dae5-4f11-a60f-4a6a731fc84b"], Cell["Number of divisors", "Text",ExpressionUUID->"2a717cc7-266c-4882-8bbe-e1c0621f7b70"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MoebiusTransform", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"DivisorSigma", "[", RowBox[{"0", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "10"}], "}"}]}], "]"}], "]"}]], "Input",ExpressionUUID-\ >"89e33c94-15ea-4316-932d-94f89ad98219"], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1"}], "}"}]], "Output",ExpressionUUID->"2fbc665b-f39a-4fcd-\ b621-8ed5badb28fd"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"InverseMoebiusTransform", "[", RowBox[{"Table", "[", RowBox[{"1", ",", RowBox[{"{", "20", "}"}]}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"DivisorSigma", "[", RowBox[{"0", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}], "}"}], "//", "ColumnForm"}]], "Input",ExpressionUUID->"3a293716-6756-448c-9a86-\ 9799d4f607dd"], Cell[BoxData[ InterpretationBox[GridBox[{ { RowBox[{"{", RowBox[{ "1", ",", "2", ",", "2", ",", "3", ",", "2", ",", "4", ",", "2", ",", "4", ",", "3", ",", "4", ",", "2", ",", "6", ",", "2", ",", "4", ",", "4", ",", "5", ",", "2", ",", "6", ",", "2", ",", "6"}], "}"}]}, { RowBox[{"{", RowBox[{ "1", ",", "2", ",", "2", ",", "3", ",", "2", ",", "4", ",", "2", ",", "4", ",", "3", ",", "4", ",", "2", ",", "6", ",", "2", ",", "4", ",", "4", ",", "5", ",", "2", ",", "6", ",", "2", ",", "6"}], "}"}]} }, BaselinePosition->{Baseline, {1, 1}}, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}], ColumnForm[{{1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6}, { 1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6}}], Editable->False]], "Output",ExpressionUUID->"cb66592e-ec19-4e04-8067-\ 00d1e367555c"] }, Open ]], Cell["Totient function", "Text",ExpressionUUID->"7b5acfe4-6642-4872-9a06-1d925d392481"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"MoebiusTransform", "[", RowBox[{"Range", "[", "20", "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"EulerPhi", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}], "}"}], "//", "ColumnForm"}]], "Input",ExpressionUUID->"39b885d1-1500-4d93-bd2e-\ 733af587f0a7"], Cell[BoxData[ InterpretationBox[GridBox[{ { RowBox[{"{", RowBox[{ "1", ",", "1", ",", "2", ",", "2", ",", "4", ",", "2", ",", "6", ",", "4", ",", "6", ",", "4", ",", "10", ",", "4", ",", "12", ",", "6", ",", "8", ",", "8", ",", "16", ",", "6", ",", "18", ",", "8"}], "}"}]}, { RowBox[{"{", RowBox[{ "1", ",", "1", ",", "2", ",", "2", ",", "4", ",", "2", ",", "6", ",", "4", ",", "6", ",", "4", ",", "10", ",", "4", ",", "12", ",", "6", ",", "8", ",", "8", ",", "16", ",", "6", ",", "18", ",", "8"}], "}"}]} }, BaselinePosition->{Baseline, {1, 1}}, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}], ColumnForm[{{1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8}, {1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8}}], Editable->False]], "Output",ExpressionUUID->"093d5976-469c-443c-bcf0-\ 6f1a36c38b71"] }, Open ]], Cell["Sum of two squares", "Text",ExpressionUUID->"e5046ed3-6148-4726-a599-61664c3915c1"], Cell[BoxData[{ RowBox[{ RowBox[{"b", "[", RowBox[{"n_Integer", "?", "EvenQ"}], "]"}], ":=", "0"}], "\n", RowBox[{ RowBox[{"b", "[", RowBox[{"n_Integer", "?", "OddQ"}], "]"}], ":=", RowBox[{"4", RowBox[{ RowBox[{"(", RowBox[{"-", "1"}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1"}], ")"}], "/", "2"}], ")"}]}]}]}]}], "Input",Expr\ essionUUID->"b10a880e-b6de-466b-857b-b34837e9d976"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"InverseMoebiusTransform", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"b", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"SquaresR", "[", RowBox[{"2", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "20"}], "}"}]}], "]"}]}], "}"}], "//", "ColumnForm"}]], "Input",ExpressionUUID->"da52a9ba-d4b5-47f7-9601-\ 536add4510eb"], Cell[BoxData[ InterpretationBox[GridBox[{ { RowBox[{"{", RowBox[{ "4", ",", "4", ",", "0", ",", "4", ",", "8", ",", "0", ",", "0", ",", "4", ",", "4", ",", "8", ",", "0", ",", "0", ",", "8", ",", "0", ",", "0", ",", "4", ",", "8", ",", "4", ",", "0", ",", "8"}], "}"}]}, { RowBox[{"{", RowBox[{ "4", ",", "4", ",", "0", ",", "4", ",", "8", ",", "0", ",", "0", ",", "4", ",", "4", ",", "8", ",", "0", ",", "0", ",", "8", ",", "0", ",", "0", ",", "4", ",", "8", ",", "4", ",", "0", ",", "8"}], "}"}]} }, BaselinePosition->{Baseline, {1, 1}}, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}], ColumnForm[{{4, 4, 0, 4, 8, 0, 0, 4, 4, 8, 0, 0, 8, 0, 0, 4, 8, 4, 0, 8}, { 4, 4, 0, 4, 8, 0, 0, 4, 4, 8, 0, 0, 8, 0, 0, 4, 8, 4, 0, 8}}], Editable->False]], "Output",ExpressionUUID->"20cb9eff-d60b-498e-90dd-\ 396a61e9b8bf"] }, Open ]], Cell["Number of distinct primes dividing n (M0056)", "Text",ExpressionUUID->"40640417-c08f-4dc6-876e-2ec531fe754a"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"InverseMoebiusTransform", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"p", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "50"}], "}"}]}], "]"}], "]"}]], "Input",ExpressionUUID-\ >"ae2fb66c-4add-4e80-a8fd-22378618ed9b"], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "2", ",", "1", ",", "1", ",", "1", ",", "2", ",", "1", ",", "2", ",", "1", ",", "2", ",", "2", ",", "1", ",", "1", ",", "2", ",", "1", ",", "2", ",", "2", ",", "2", ",", "1", ",", "2", ",", "1", ",", "2", ",", "1", ",", "2", ",", "1", ",", "3", ",", "1", ",", "1", ",", "2", ",", "2", ",", "2", ",", "2", ",", "1", ",", "2", ",", "2", ",", "2", ",", "1", ",", "3", ",", "1", ",", "2", ",", "2", ",", "2", ",", "1", ",", "2", ",", "1", ",", "2"}], "}"}]], "Output",ExpressionU\ UID->"3f843c96-83d0-433e-a852-612582a6db88"] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{606, 858}, WindowMargins->{{Automatic, 193}, {Automatic, 21}}, ShowSelection->True, FrontEndVersion->"11.1 for Mac OS X x86 (32-bit, 64-bit Kernel) (June 2, \ 2017)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 89, 0, 92, "Title", "ExpressionUUID" -> \ "81117ff4-cd9b-4fbb-ad3a-51455b648cfd"], Cell[CellGroupData[{ Cell[694, 26, 83, 0, 44, "Subsection", "ExpressionUUID" -> \ "78d153d8-da32-462d-b502-b120009e9cd7"], Cell[780, 28, 108, 3, 49, "Text", "ExpressionUUID" -> \ "19c323ef-ca42-49fe-aea7-11e1c875d25c"], Cell[891, 33, 348, 9, 49, "Text", "ExpressionUUID" -> \ "b1f8df44-ff55-4eb1-bdd0-77993857f388"], Cell[1242, 44, 362, 10, 49, "Text", "ExpressionUUID" -> \ "a96a9c1c-3bcb-4882-96cc-e4ee6b01afd8"], Cell[1607, 56, 154, 2, 30, "Text", "ExpressionUUID" -> \ "034b19e0-81e9-47ff-ab76-f7e4b4053e46"] }, Open ]], Cell[CellGroupData[{ Cell[1798, 63, 82, 0, 64, "Section", "ExpressionUUID" -> \ "9647d2f5-dae5-4f11-a60f-4a6a731fc84b"], Cell[1883, 65, 89, 0, 30, "Text", "ExpressionUUID" -> \ "2a717cc7-266c-4882-8bbe-e1c0621f7b70"], Cell[CellGroupData[{ Cell[1997, 69, 301, 8, 32, "Input", "ExpressionUUID" -> \ "89e33c94-15ea-4316-932d-94f89ad98219"], Cell[2301, 79, 217, 5, 32, "Output", "ExpressionUUID" -> \ "2fbc665b-f39a-4fcd-b621-8ed5badb28fd"] }, Open ]], Cell[CellGroupData[{ Cell[2555, 89, 519, 15, 54, "Input", "ExpressionUUID" -> \ "3a293716-6756-448c-9a86-9799d4f607dd"], Cell[3077, 106, 981, 22, 51, "Output", "ExpressionUUID" -> \ "cb66592e-ec19-4e04-8067-00d1e367555c"] }, Open ]], Cell[4073, 131, 87, 0, 30, "Text", "ExpressionUUID" -> \ "7b5acfe4-6642-4872-9a06-1d925d392481"], Cell[CellGroupData[{ Cell[4185, 135, 425, 12, 54, "Input", "ExpressionUUID" -> \ "39b885d1-1500-4d93-bd2e-733af587f0a7"], Cell[4613, 149, 997, 22, 51, "Output", "ExpressionUUID" -> \ "093d5976-469c-443c-bcf0-6f1a36c38b71"] }, Open ]], Cell[5625, 174, 89, 0, 30, "Text", "ExpressionUUID" -> \ "e5046ed3-6148-4726-a599-61664c3915c1"], Cell[5717, 176, 464, 15, 54, "Input", "ExpressionUUID" -> \ "b10a880e-b6de-466b-857b-b34837e9d976"], Cell[CellGroupData[{ Cell[6206, 195, 582, 18, 54, "Input", "ExpressionUUID" -> \ "da52a9ba-d4b5-47f7-9601-536add4510eb"], Cell[6791, 215, 981, 22, 51, "Output", "ExpressionUUID" -> \ "20cb9eff-d60b-498e-90dd-396a61e9b8bf"] }, Open ]], Cell[7787, 240, 115, 0, 30, "Text", "ExpressionUUID" -> \ "40640417-c08f-4dc6-876e-2ec531fe754a"], Cell[CellGroupData[{ Cell[7927, 244, 271, 7, 32, "Input", "ExpressionUUID" -> \ "ae2fb66c-4add-4e80-a8fd-22378618ed9b"], Cell[8201, 253, 637, 10, 70, "Output", "ExpressionUUID" -> \ "3f843c96-83d0-433e-a852-612582a6db88"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)