(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 13.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 34374, 918] NotebookOptionsPosition[ 30088, 811] NotebookOutlinePosition[ 31844, 863] CellTagsIndexPosition[ 31801, 860] WindowTitle->TwinPrimes | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(3)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->462042388], Cell["Here are the first 10 pairs of twin primes:", "Text", TaggingRules->{}, CellChangeTimes->{{3.76512122580576*^9, 3.765121252436178*^9}, { 3.7655566120799217`*^9, 3.765556624725718*^9}, {3.765641261527213*^9, 3.765641269718419*^9}, {3.76564131722788*^9, 3.7656413178287077`*^9}}, CellID->332281174], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["TwinPrimes", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["TwinPrimes", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"2.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/TwinPrimes"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "TwinPrimes"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["TwinPrimes"], BoxID -> "TwinPrimes", Selectable->False], "[", "10", "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.765121013450848*^9, 3.7651210164687347`*^9}, { 3.7655565779998817`*^9, 3.765556607958498*^9}, {3.76564127348106*^9, 3.765641274062436*^9}}, CellLabel->"In[321]:=", CellID->347865431], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"17", ",", "19"}], "}"}], ",", RowBox[{"{", RowBox[{"29", ",", "31"}], "}"}], ",", RowBox[{"{", RowBox[{"41", ",", "43"}], "}"}], ",", RowBox[{"{", RowBox[{"59", ",", "61"}], "}"}], ",", RowBox[{"{", RowBox[{"71", ",", "73"}], "}"}], ",", RowBox[{"{", RowBox[{"101", ",", "103"}], "}"}], ",", RowBox[{"{", RowBox[{"107", ",", "109"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.765121017386257*^9, {3.7655565792793703`*^9, 3.7655566085213127`*^9}, 3.76564127499816*^9, 3.767970530717946*^9, 3.767974931565514*^9, 3.767984169563395*^9, {3.76798421441962*^9, 3.7679842193189983`*^9}, 3.7679845293721857`*^9}, CellLabel->"Out[321]=", CellID->915628905] }, Open ]], Cell["Indeed, the differences are 2:", "Text", TaggingRules->{}, CellChangeTimes->{{3.767984180809988*^9, 3.76798420069608*^9}, { 3.767984520367071*^9, 3.767984538165585*^9}}, CellID->405297591], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Differences", "/@", "%"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.767984202473281*^9, 3.7679842404630413`*^9}, { 3.767984525160301*^9, 3.767984525702305*^9}}, CellLabel->"In[322]:=", CellID->767372438], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "2", "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.767984209484774*^9, 3.7679842427715673`*^9}, 3.767984540376465*^9}, CellLabel->"Out[322]=", CellID->86659553] }, Open ]], Cell["For reference, here are the first 30 primes:", "Text", TaggingRules->{}, CellChangeTimes->{{3.765121256958571*^9, 3.765121273186818*^9}, { 3.7655566328153763`*^9, 3.765556633117526*^9}, {3.765641283511821*^9, 3.765641296781417*^9}}, CellID->973275443], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Prime", "[", RowBox[{"Range", "[", "30", "]"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.765121047839074*^9, 3.7651210528595133`*^9}, { 3.765556637239925*^9, 3.765556637493143*^9}, {3.765641289110574*^9, 3.7656413000535593`*^9}}, CellLabel->"In[309]:=", CellID->756653026], Cell[BoxData[ RowBox[{"{", RowBox[{ "2", ",", "3", ",", "5", ",", "7", ",", "11", ",", "13", ",", "17", ",", "19", ",", "23", ",", "29", ",", "31", ",", "37", ",", "41", ",", "43", ",", "47", ",", "53", ",", "59", ",", "61", ",", "67", ",", "71", ",", "73", ",", "79", ",", "83", ",", "89", ",", "97", ",", "101", ",", "103", ",", "107", ",", "109", ",", "113"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.765121058124792*^9, 3.76555663857388*^9, {3.7656412900515347`*^9, 3.765641300870419*^9}, 3.7679705381554747`*^9, 3.7679749368484173`*^9, 3.767984253789562*^9}, CellLabel->"Out[309]=", CellID->807055079] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Neat Examples", "\[NonBreakingSpace]", Cell["(3)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->540091361], Cell["The sum of the reciprocals of the primes diverges:", "Text", TaggingRules->{}, CellChangeTimes->{{3.765122530975067*^9, 3.765122681881173*^9}, { 3.765122782473115*^9, 3.765122784893331*^9}, {3.765122911864938*^9, 3.7651229566321793`*^9}, {3.765556684676738*^9, 3.76555669595091*^9}, { 3.767984548157551*^9, 3.7679845488694563`*^9}}, CellID->278137682], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"1", "/", RowBox[{"Prime", "@", "n"}]}], ",", RowBox[{"{", RowBox[{"n", ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.765556699442718*^9, 3.7655567204188623`*^9}}, CellLabel->"In[163]:=", CellID->452050220], Cell[BoxData[ TemplateBox[{ "Sum", "div", "\"Sum does not converge.\"", 2, 163, 20, 20882902709185670000, "Local"}, "MessageTemplate"]], "Message", "MSG", TaggingRules->{}, CellChangeTimes->{3.765556721656313*^9, 3.767970542940802*^9}, CellLabel->"During evaluation of In[163]:=", CellID->312651357], Cell[BoxData[ RowBox[{ UnderoverscriptBox["\[Sum]", "n", "\[Infinity]"], FractionBox["1", RowBox[{"Prime", "[", "n", "]"}]]}]], "Output", TaggingRules->{}, CellChangeTimes->{3.765556721694675*^9, 3.767970542947427*^9}, CellLabel->"Out[163]=", CellID->302611997] }, Open ]], Cell[TextData[{ "In 1919, Brun proved that the sum of the reciprocals of the twin primes \ converges. The sum, ", ButtonBox["Brun's constant", BaseStyle->"Hyperlink", ButtonData->{ URL["https://mathworld.wolfram.com/BrunsConstant.html"], None}, ButtonNote->"https://mathworld.wolfram.com/BrunsConstant.html"], ", is around 1.9. Here is the sum of the reciprocals of the first 100,000 \ twin primes:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.765122530975067*^9, 3.765122681881173*^9}, { 3.765122782473115*^9, 3.765122784893331*^9}, {3.765122911864938*^9, 3.7651229566321793`*^9}, {3.765556684676738*^9, 3.7655566951876802`*^9}, { 3.771346146776432*^9, 3.77134614760089*^9}, {3.854025805675942*^9, 3.854025805680287*^9}}, CellID->695244675], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Total", "[", RowBox[{"1.", "/", RowBox[{"Flatten", "@", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["TwinPrimes", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["TwinPrimes", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{ "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"2.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/TwinPrimes"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "TwinPrimes"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["TwinPrimes"], BoxID -> "TwinPrimes", Selectable->False], "[", RowBox[{"10", "^", "5"}], "]"}]}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.765122319146441*^9, 3.7651223478611603`*^9}, { 3.765556863423828*^9, 3.76555686389399*^9}}, CellLabel->"In[310]:=", CellID->757127057], Cell[BoxData["1.7443311906887455`"], "Output", TaggingRules->{}, CellChangeTimes->{{3.765122334798153*^9, 3.765122354383597*^9}, { 3.765556860102454*^9, 3.7655568674961452`*^9}, 3.7679705474170637`*^9, 3.76797495960742*^9, 3.7679842743551826`*^9}, CellLabel->"Out[310]=", CellID->751871937] }, Open ]], Cell["This is the last pair in that sum:", "Text", TaggingRules->{}, CellChangeTimes->{{3.765556891524994*^9, 3.765556913451474*^9}}, CellID->229882933], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Last", "@", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["TwinPrimes", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["TwinPrimes", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"2.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/TwinPrimes"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "TwinPrimes"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["TwinPrimes"], BoxID -> "TwinPrimes", Selectable->False], "[", RowBox[{"10", "^", "5"}], "]"}]}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7655569071599007`*^9, 3.765556909196786*^9}}, CellLabel->"In[311]:=", CellID->597676861], Cell[BoxData[ RowBox[{"{", RowBox[{"18409199", ",", "18409201"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.765556903849182*^9, 3.765556910032526*^9}, 3.767970555113454*^9, 3.7679749668443813`*^9, 3.7679842817755613`*^9}, CellLabel->"Out[311]=", CellID->903147814] }, Open ]] }, Closed]] }, ClosingSaveDialog->False, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"TwinPrimes | Example Notebook", Visible->False, FrontEndVersion->"13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions->Notebook[{ Cell[ StyleData[ StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb", CharacterEncoding -> "UTF-8"]]], Cell[ StyleData[All, "Working"], Editable -> True, DockedCells -> {}], Cell[ StyleData["Notebook"], Editable -> True, DockedCells -> {}, ScrollingOptions -> {"VerticalScrollRange" -> Automatic}], Cell[ StyleData[ "Section", StyleDefinitions -> StyleData["PrimaryExamplesSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Subsection", StyleDefinitions -> StyleData["ExampleSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsection", StyleDefinitions -> StyleData["ExampleSubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsubsection", StyleDefinitions -> StyleData["ExampleSubsubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Text", StyleDefinitions -> StyleData["ExampleText"]], Editable -> True]}, Visible -> False, FrontEndVersion -> "13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions -> "PrivateStylesheetFormatting.nb"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[623, 23, 168, 7, 70, "Subsection",ExpressionUUID->"25363b32-4cfa-4635-8c31-fed91dfe99d7", CellID->462042388], Cell[794, 32, 310, 5, 70, "Text",ExpressionUUID->"ccbb5d72-4ee9-479d-b1cd-50ccc0865342", CellID->332281174], Cell[CellGroupData[{ Cell[1129, 41, 7219, 181, 70, "Input",ExpressionUUID->"a11328bb-19d2-4c1d-9cb8-7e27740a3870", CellID->347865431], Cell[8351, 224, 992, 30, 70, "Output",ExpressionUUID->"41e6af4f-7306-496d-9cf6-9c7392750ef0", CellID->915628905] }, Open ]], Cell[9358, 257, 199, 4, 70, "Text",ExpressionUUID->"ff752957-11d8-482b-9722-5d46ed303772", CellID->405297591], Cell[CellGroupData[{ Cell[9582, 265, 241, 6, 70, "Input",ExpressionUUID->"dc9cd410-7ab3-4d05-a316-2d65b2e915eb", CellID->767372438], Cell[9826, 273, 550, 17, 70, "Output",ExpressionUUID->"6ba5e9ef-2a9f-4551-8291-25602555798d", CellID->86659553] }, Open ]], Cell[10391, 293, 265, 5, 70, "Text",ExpressionUUID->"7512ca7a-db04-42af-bd93-df83f0c27f9f", CellID->973275443], Cell[CellGroupData[{ Cell[10681, 302, 323, 8, 70, "Input",ExpressionUUID->"6e6f092a-3bee-46c0-a25c-fff75197cb92", CellID->756653026], Cell[11007, 312, 659, 14, 70, "Output",ExpressionUUID->"9d479cf5-8417-488a-a37a-8fdb8b280aee", CellID->807055079] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[11715, 332, 167, 7, 70, "Subsection",ExpressionUUID->"a20a5d56-1e0e-46a2-a35e-43937261b013", CellID->540091361], Cell[11885, 341, 367, 6, 70, "Text",ExpressionUUID->"9e3097c1-9750-414c-85ed-3f690c545dcf", CellID->278137682], Cell[CellGroupData[{ Cell[12277, 351, 323, 10, 70, "Input",ExpressionUUID->"a5a12fe8-6230-4291-85de-98df101a7c7a", CellID->452050220], Cell[12603, 363, 312, 8, 70, "Message",ExpressionUUID->"27a62e36-c847-4f72-848d-386fab653924", CellID->312651357], Cell[12918, 373, 275, 8, 70, "Output",ExpressionUUID->"1b712acd-a98b-443c-a330-4100da3b7524", CellID->302611997] }, Open ]], Cell[13208, 384, 774, 17, 70, "Text",ExpressionUUID->"ef61d3b8-487a-400c-a5bc-bbbd113f54b5", CellID->695244675], Cell[CellGroupData[{ Cell[14007, 405, 7876, 191, 70, "Input",ExpressionUUID->"caac1db9-80f4-49e4-a053-0f16df4c58b2", CellID->757127057], Cell[21886, 598, 301, 6, 70, "Output",ExpressionUUID->"c8781e4d-f378-4485-abc9-2b23ffc49105", CellID->751871937] }, Open ]], Cell[22202, 607, 155, 3, 70, "Text",ExpressionUUID->"c605c3ae-0190-44f2-ba09-ead0255d43de", CellID->229882933], Cell[CellGroupData[{ Cell[22382, 614, 7384, 184, 70, "Input",ExpressionUUID->"f7033d48-2552-4677-a41e-939ae7a9c8ff", CellID->597676861], Cell[29769, 800, 291, 7, 70, "Output",ExpressionUUID->"61842085-9e96-42e5-a5fc-f081f57ddcbd", CellID->903147814] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)