(* 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[ 41869, 1151] NotebookOptionsPosition[ 34970, 994] NotebookOutlinePosition[ 36727, 1046] CellTagsIndexPosition[ 36684, 1043] WindowTitle->RepeatUntil | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->904125756], Cell["Basic usage:", "Text", TaggingRules->{}, CellChangeTimes->{{3.751799498108254*^9, 3.751799500508151*^9}}, CellID->768196425], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"i", "=", "1"}], ";", 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["RepeatUntil", "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["RepeatUntil", "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["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/RepeatUntil"}, "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], "RepeatUntil"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["RepeatUntil"], BoxID -> "RepeatUntil", Selectable->False], "[", RowBox[{ RowBox[{"i", "++"}], ",", RowBox[{ RowBox[{"Print", "[", "i", "]"}], ";", RowBox[{"i", "<", "5"}]}]}], "]"}], ";", "i"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7517200493635674`*^9, 3.7517200805314074`*^9}, { 3.751734959317404*^9, 3.751734970106811*^9}, 3.751735018966023*^9}, CellLabel->"In[4]:=", CellID->624665693], Cell[CellGroupData[{ Cell[BoxData["2"], "Print", TaggingRules->{}, CellChangeTimes->{{3.7517991280068407`*^9, 3.7517991985399847`*^9}, 3.752326898383081*^9}, CellLabel->"During evaluation of In[4]:=", CellID->928485789], Cell[BoxData["3"], "Print", TaggingRules->{}, CellChangeTimes->{{3.7517991280068407`*^9, 3.7517991985399847`*^9}, 3.752326898395376*^9}, CellLabel->"During evaluation of In[4]:=", CellID->66065168], Cell[BoxData["4"], "Print", TaggingRules->{}, CellChangeTimes->{{3.7517991280068407`*^9, 3.7517991985399847`*^9}, 3.752326898407432*^9}, CellLabel->"During evaluation of In[4]:=", CellID->865134816], Cell[BoxData["5"], "Print", TaggingRules->{}, CellChangeTimes->{{3.7517991280068407`*^9, 3.7517991985399847`*^9}, 3.75232689841474*^9}, CellLabel->"During evaluation of In[4]:=", CellID->566212186] }, Open ]], Cell[BoxData["5"], "Output", TaggingRules->{}, CellChangeTimes->{ 3.751720056120654*^9, 3.751720090975312*^9, 3.751721393223549*^9, { 3.751734953105679*^9, 3.751734974548649*^9}, {3.751735008136426*^9, 3.751735021885228*^9}, 3.7517350959612503`*^9, 3.751747742759535*^9, 3.7517480312777157`*^9, 3.751748066296857*^9, {3.751797505242442*^9, 3.751797515696889*^9}, 3.7517976103438873`*^9, 3.7517980324612722`*^9, 3.751798063290258*^9, 3.75179822147154*^9, {3.7517982569923153`*^9, 3.751798259194521*^9}, {3.751799135327921*^9, 3.751799198578302*^9}, 3.752326898421913*^9}, CellLabel->"Out[4]=", CellID->205323089] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Applications", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->605265931], Cell["The number of iterations to get an approximation:", "Text", TaggingRules->{}, CellChangeTimes->{{3.7517994669082336`*^9, 3.7517994708533707`*^9}, { 3.7518000960980577`*^9, 3.751800099843545*^9}, {3.7518029891215773`*^9, 3.751803005768976*^9}, {3.751803853154045*^9, 3.751803858882004*^9}, { 3.765290576389112*^9, 3.765290577634344*^9}}, CellID->525501475], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"x", "=", "1.0"}], ";", RowBox[{"n", "=", "1"}], ";", RowBox[{"r", "=", "1.0"}], ";"}], "\n", RowBox[{ 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["RepeatUntil", "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["RepeatUntil", "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["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/RepeatUntil"}, "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], "RepeatUntil"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["RepeatUntil"], BoxID -> "RepeatUntil", Selectable->False], "[", RowBox[{ RowBox[{ RowBox[{"r", "=", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "+", FractionBox["x", "n"]}], ")"}], "n"]}], ";", RowBox[{"n", "++"}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Exp", "[", "x", "]"}], "-", "r"}], ">", SuperscriptBox["10", RowBox[{"-", "6"}]]}], ",", "True", ",", RowBox[{"Break", "[", "]"}]}], "]"}]}], "]"}], ";", RowBox[{"{", RowBox[{"r", ",", "n"}], "}"}]}]}], "Input", TaggingRules->{}, CellChangeTimes->{{3.751801892641758*^9, 3.751801895943272*^9}, { 3.751801951230051*^9, 3.7518020333199577`*^9}, {3.7518021346189528`*^9, 3.751802137800497*^9}, {3.751802172451178*^9, 3.7518022721855173`*^9}, { 3.751802315240395*^9, 3.751802327459959*^9}, {3.751802417855686*^9, 3.7518024736380453`*^9}, 3.751802553236546*^9, 3.751802601315921*^9, 3.7518029580989733`*^9, {3.751803156876729*^9, 3.7518032085768948`*^9}, { 3.7518032838059893`*^9, 3.7518033413607883`*^9}, {3.751803600412047*^9, 3.751803651891007*^9}}, CellLabel->"In[10]:=", CellID->11737930], Cell[BoxData[ RowBox[{"{", RowBox[{"2.7182808285894713`", ",", "1358404"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.751803202326063*^9, 3.751803209237132*^9}, { 3.7518032912929487`*^9, 3.751803333230585*^9}, 3.751803526176826*^9, { 3.751803628946721*^9, 3.751803656486924*^9}, {3.752326921429267*^9, 3.7523269483973913`*^9}}, CellLabel->"Out[11]=", CellID->487011900] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->1199720555], Cell["Searching sequences of primes:", "Text", TaggingRules->{}, CellChangeTimes->{{3.7517994669082336`*^9, 3.7517994708533707`*^9}, { 3.7518000960980577`*^9, 3.751800099843545*^9}}, CellID->866422081], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"k", "=", RowBox[{"-", "1"}]}], ";"}], "\n", 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["RepeatUntil", "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["RepeatUntil", "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["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/RepeatUntil"}, "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], "RepeatUntil"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["RepeatUntil"], BoxID -> "RepeatUntil", Selectable->False], "[", RowBox[{ RowBox[{"k", "++"}], ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Print", "[", "#", "]"}], ";", RowBox[{"PrimeQ", "[", "#", "]"}]}], ")"}], "&"}], "[", RowBox[{ RowBox[{"4180566390", " ", "k"}], "+", "8297644387"}], "]"}]}], "]"}]}], "Input", TaggingRules->{}, CellChangeTimes->{{3.75179988774951*^9, 3.75180001247206*^9}, { 3.75180004886063*^9, 3.7518000835572844`*^9}}, CellLabel->"In[5]:=", CellID->272301091], Cell[CellGroupData[{ Cell[BoxData["8297644387"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269072643957`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->370479703], Cell[BoxData["12478210777"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907274808*^9}, CellLabel->"During evaluation of In[5]:=", CellID->142708998], Cell[BoxData["16658777167"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907284443*^9}, CellLabel->"During evaluation of In[5]:=", CellID->30659220], Cell[BoxData["20839343557"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907289578*^9}, CellLabel->"During evaluation of In[5]:=", CellID->222352682], Cell[BoxData["25019909947"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.75232690729462*^9}, CellLabel->"During evaluation of In[5]:=", CellID->35818474], Cell[BoxData["29200476337"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269072999783`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->859556922], Cell[BoxData["33381042727"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907305274*^9}, CellLabel->"During evaluation of In[5]:=", CellID->200737934], Cell[BoxData["37561609117"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907310495*^9}, CellLabel->"During evaluation of In[5]:=", CellID->709187379], Cell[BoxData["41742175507"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269073156557`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->34516982], Cell[BoxData["45922741897"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907320834*^9}, CellLabel->"During evaluation of In[5]:=", CellID->699069096], Cell[BoxData["50103308287"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907329185*^9}, CellLabel->"During evaluation of In[5]:=", CellID->613916093], Cell[BoxData["54283874677"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907337594*^9}, CellLabel->"During evaluation of In[5]:=", CellID->929571569], Cell[BoxData["58464441067"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269073459063`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->121875265], Cell[BoxData["62645007457"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269073539352`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->381335561], Cell[BoxData["66825573847"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907361114*^9}, CellLabel->"During evaluation of In[5]:=", CellID->830974739], Cell[BoxData["71006140237"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269073683653`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->907173496], Cell[BoxData["75186706627"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907373715*^9}, CellLabel->"During evaluation of In[5]:=", CellID->950788049], Cell[BoxData["79367273017"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907378798*^9}, CellLabel->"During evaluation of In[5]:=", CellID->541608450], Cell[BoxData["83547839407"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.752326907383995*^9}, CellLabel->"During evaluation of In[5]:=", CellID->91807253], Cell[BoxData["87728405797"], "Print", TaggingRules->{}, CellChangeTimes->{ 3.7518000130542603`*^9, {3.751800057960848*^9, 3.7518000839402523`*^9}, 3.7523269073891277`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->176741029] }, Open ]] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Properties and Relations", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->232113220], Cell[TextData[{ "Here is an equivalent structure using ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["While", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/While", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro", FontSize->0.9428571428571428 Inherited], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.7517994669082336`*^9, 3.7517994708533707`*^9}, { 3.751799586906804*^9, 3.7517995990224113`*^9}, 3.765290618624124*^9, { 3.765552034193883*^9, 3.765552055221274*^9}}, CellID->913500833], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"i", "=", "1"}], ";", RowBox[{"While", "[", RowBox[{ RowBox[{"i", "++"}], ";", RowBox[{"Print", "[", "i", "]"}], ";", RowBox[{"i", "<", "5"}]}], "]"}], ";", "i"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7517200493635674`*^9, 3.7517200805314074`*^9}, { 3.751734959317404*^9, 3.751734970106811*^9}, 3.751735018966023*^9, { 3.751799563172282*^9, 3.751799571886848*^9}}, CellLabel->"In[7]:=", CellID->322153839], Cell[CellGroupData[{ Cell[BoxData["2"], "Print", TaggingRules->{}, CellChangeTimes->{3.7517995726008177`*^9, 3.752326910969303*^9}, CellLabel->"During evaluation of In[7]:=", CellID->427442924], Cell[BoxData["3"], "Print", TaggingRules->{}, CellChangeTimes->{3.7517995726008177`*^9, 3.752326910980274*^9}, CellLabel->"During evaluation of In[7]:=", CellID->259418279], Cell[BoxData["4"], "Print", TaggingRules->{}, CellChangeTimes->{3.7517995726008177`*^9, 3.752326910991106*^9}, CellLabel->"During evaluation of In[7]:=", CellID->787205655], Cell[BoxData["5"], "Print", TaggingRules->{}, CellChangeTimes->{3.7517995726008177`*^9, 3.752326910998723*^9}, CellLabel->"During evaluation of In[7]:=", CellID->387768057] }, Open ]], Cell[BoxData["5"], "Output", TaggingRules->{}, CellChangeTimes->{{3.751799564896226*^9, 3.7517995726336517`*^9}, 3.752326911005744*^9}, CellLabel->"Out[7]=", CellID->849272461] }, Open ]] }, Closed]] }, ClosingSaveDialog->False, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"RepeatUntil | 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[624, 23, 168, 7, 70, "Subsection",ExpressionUUID->"782dd09f-9bfe-48fe-967a-db5b5cbb0749", CellID->904125756], Cell[795, 32, 133, 3, 70, "Text",ExpressionUUID->"dccdb1cf-c9e3-435f-9aa1-117704817f12", CellID->768196425], Cell[CellGroupData[{ Cell[953, 39, 7598, 190, 70, "Input",ExpressionUUID->"ccbde46c-f94b-41bb-bf89-989b237efdbf", CellID->624665693], Cell[CellGroupData[{ Cell[8576, 233, 206, 5, 70, "Print",ExpressionUUID->"f18a0107-86f5-4c8f-aca9-36896626171c", CellID->928485789], Cell[8785, 240, 205, 5, 70, "Print",ExpressionUUID->"c0eef8fa-5662-461c-9a90-8479438b54e4", CellID->66065168], Cell[8993, 247, 206, 5, 70, "Print",ExpressionUUID->"e353cde6-484d-4f35-9ded-54d0836401b7", CellID->865134816], Cell[9202, 254, 205, 5, 70, "Print",ExpressionUUID->"f7acd50e-aeae-4ebd-9909-b297e7eb75ab", CellID->566212186] }, Open ]], Cell[9422, 262, 644, 12, 70, "Output",ExpressionUUID->"5ca4b9df-d161-4abb-bd28-5eaf61e68a6c", CellID->205323089] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10115, 280, 166, 7, 70, "Subsection",ExpressionUUID->"71b98bea-66d7-4356-b620-4fa1192300f0", CellID->605265931], Cell[10284, 289, 371, 6, 70, "Text",ExpressionUUID->"442511cd-633e-472d-9371-e303de9c765c", CellID->525501475], Cell[CellGroupData[{ Cell[10680, 299, 8462, 212, 70, "Input",ExpressionUUID->"2acb69ba-f74f-417d-b7e1-4603af408aae", CellID->11737930], Cell[19145, 513, 402, 9, 70, "Output",ExpressionUUID->"056bb37e-01af-4b4a-b579-bc341356ef0a", CellID->487011900] }, Open ]], Cell[CellGroupData[{ Cell[19584, 527, 145, 4, 70, "ExampleDelimiter",ExpressionUUID->"544e9183-31a1-45de-81a2-5458bdf5b6e0", CellID->1199720555], Cell[19732, 533, 206, 4, 70, "Text",ExpressionUUID->"d9df8f57-c85f-4943-bd0f-4c2562229c27", CellID->866422081], Cell[CellGroupData[{ Cell[19963, 541, 7550, 195, 70, "Input",ExpressionUUID->"7965d0f0-4d03-4e2b-891c-aa32f731a84c", CellID->272301091], Cell[CellGroupData[{ Cell[27538, 740, 242, 6, 70, "Print",ExpressionUUID->"a1043730-56c7-4ab3-afa6-42dc05eed6dc", CellID->370479703], Cell[27783, 748, 241, 6, 70, "Print",ExpressionUUID->"d065240d-b608-48e5-91d5-fb0ae3606789", CellID->142708998], Cell[28027, 756, 240, 6, 70, "Print",ExpressionUUID->"3c39b199-d019-459f-9c3a-ec6e99df742d", CellID->30659220], Cell[28270, 764, 241, 6, 70, "Print",ExpressionUUID->"76f42e63-946b-4855-a504-fe03a7b7e635", CellID->222352682], Cell[28514, 772, 239, 6, 70, "Print",ExpressionUUID->"8ed5fbec-299b-4fe4-b4fa-e1d2008ffc8a", CellID->35818474], Cell[28756, 780, 243, 6, 70, "Print",ExpressionUUID->"e47ddec8-ba5d-49f6-8a41-c3c232e3a132", CellID->859556922], Cell[29002, 788, 241, 6, 70, "Print",ExpressionUUID->"becf1570-856c-46fb-85cc-453f31809aac", CellID->200737934], Cell[29246, 796, 241, 6, 70, "Print",ExpressionUUID->"e16e0205-ab74-4231-a336-4abd7639a562", CellID->709187379], Cell[29490, 804, 242, 6, 70, "Print",ExpressionUUID->"c9dfe0de-e3f1-45cc-89ed-391ad1fedcb7", CellID->34516982], Cell[29735, 812, 241, 6, 70, "Print",ExpressionUUID->"5f1bb308-778d-41e4-a2db-0615fbde9eaf", CellID->699069096], Cell[29979, 820, 241, 6, 70, "Print",ExpressionUUID->"e9e37f6c-866d-4106-8c05-e3d784e5948a", CellID->613916093], Cell[30223, 828, 241, 6, 70, "Print",ExpressionUUID->"c46229bb-6cc1-4bf6-af33-553a91b2e162", CellID->929571569], Cell[30467, 836, 243, 6, 70, "Print",ExpressionUUID->"75822dfb-a666-4960-b1ed-40c7ec8e6b13", CellID->121875265], Cell[30713, 844, 243, 6, 70, "Print",ExpressionUUID->"3ae04220-8259-4f7f-88da-b827e680914c", CellID->381335561], Cell[30959, 852, 241, 6, 70, "Print",ExpressionUUID->"7d67a741-a7c5-46d3-b3d5-f3c69185eef0", CellID->830974739], Cell[31203, 860, 243, 6, 70, "Print",ExpressionUUID->"5cb16325-c122-4555-893c-8320b13991ef", CellID->907173496], Cell[31449, 868, 241, 6, 70, "Print",ExpressionUUID->"38f1100a-ebd1-4318-8dbf-2d3891a2b09e", CellID->950788049], Cell[31693, 876, 241, 6, 70, "Print",ExpressionUUID->"fe417b7d-b16e-40e5-b195-0f1f8a0df61c", CellID->541608450], Cell[31937, 884, 240, 6, 70, "Print",ExpressionUUID->"b4260488-abe3-4b03-9616-7b379a2a56ee", CellID->91807253], Cell[32180, 892, 243, 6, 70, "Print",ExpressionUUID->"66e50c02-5a47-471e-a189-cc6db7cd47bf", CellID->176741029] }, Open ]] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[32496, 906, 178, 7, 70, "Subsection",ExpressionUUID->"80a286b9-e93c-4555-80fa-d7206b0967f1", CellID->232113220], Cell[32677, 915, 821, 24, 70, "Text",ExpressionUUID->"389f068e-cceb-4f73-a448-a3974547f4b7", CellID->913500833], Cell[CellGroupData[{ Cell[33523, 943, 482, 13, 70, "Input",ExpressionUUID->"cc014d81-f509-4b6c-aeef-3317febdf165", CellID->322153839], Cell[CellGroupData[{ Cell[34030, 960, 176, 4, 70, "Print",ExpressionUUID->"24bc4c90-2bb4-4564-a660-7ffb0885c0b4", CellID->427442924], Cell[34209, 966, 176, 4, 70, "Print",ExpressionUUID->"2cca15ef-0aee-4782-9810-de7752fe2850", CellID->259418279], Cell[34388, 972, 176, 4, 70, "Print",ExpressionUUID->"39560151-0236-4671-bd62-c67fc51c6354", CellID->787205655], Cell[34567, 978, 176, 4, 70, "Print",ExpressionUUID->"7ba0ae8d-3c65-4201-bf58-fb793c8de5b9", CellID->387768057] }, Open ]], Cell[34758, 985, 184, 5, 70, "Output",ExpressionUUID->"cfa8861d-5ead-45f8-bb4c-72fd997f3b3c", CellID->849272461] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)