(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 222007, 5458] NotebookOptionsPosition[ 215591, 5266] NotebookOutlinePosition[ 216195, 5290] CellTagsIndexPosition[ 216108, 5285] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ RowBox[{"Needs", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"$IterationLimit", "=", "\[Infinity]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"$RecursionLimit", "=", "\[Infinity]"}], ";"}]}], "Input", CellChangeTimes->{{3.431688489140625*^9, 3.4316885005625*^9}, { 3.435315966078125*^9, 3.43531597453125*^9}}], Cell[CellGroupData[{ Cell["\<\ These are general methods that are potentially useful in other settings.\ \>", "Subsection", CellChangeTimes->{{3.434208553859375*^9, 3.434208559671875*^9}, { 3.434208600609375*^9, 3.43420861278125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"RemoveFromList", "[", RowBox[{ RowBox[{"{", "}"}], ",", "toRemove_", ",", "final_"}], "]"}], ":=", "final"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RemoveFromList", "[", RowBox[{ RowBox[{"{", RowBox[{"f_", ",", "R___"}], "}"}], ",", "toRemove_", ",", "final_"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"toRemove", ",", "f"}], "]"}], ",", RowBox[{"RemoveFromList", "[", RowBox[{ RowBox[{"{", "R", "}"}], ",", "toRemove", ",", "final"}], "]"}], ",", RowBox[{"RemoveFromList", "[", RowBox[{ RowBox[{"{", "R", "}"}], ",", "toRemove", ",", RowBox[{"Append", "[", RowBox[{"final", ",", "f"}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RemoveFromList", "[", RowBox[{"L_", ",", "toRemove_List"}], "]"}], ":=", RowBox[{"RemoveFromList", "[", RowBox[{"L", ",", "toRemove", ",", RowBox[{"{", "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Merge", "[", RowBox[{"A_", ",", RowBox[{"{", "}"}]}], "]"}], ":=", "A"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Merge", "[", RowBox[{"A_", ",", RowBox[{"{", RowBox[{"f_", ",", "r___"}], "}"}]}], "]"}], ":=", RowBox[{"Merge", "[", RowBox[{ RowBox[{"Append", "[", RowBox[{"A", ",", "f"}], "]"}], ",", RowBox[{"{", "r", "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Merge", "[", "A_", "]"}], ":=", "A"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Merge", "[", RowBox[{"A_", ",", "B_", ",", "r___"}], "]"}], ":=", RowBox[{"Merge", "[", RowBox[{ RowBox[{"Merge", "[", RowBox[{"A", ",", "B"}], "]"}], ",", "r"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RepeatList", "[", RowBox[{"L_", ",", "n_"}], "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{"L", ",", RowBox[{"{", "n", "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SuccessiveDifferences", "[", "L_", "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"l", "=", RowBox[{"Length", "[", "L", "]"}]}], "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"L", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"L", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "2", ",", "l"}], "}"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DifferenceSequence", "[", "L_", "]"}], ":=", RowBox[{"SuccessiveDifferences", "[", RowBox[{"Prepend", "[", RowBox[{"L", ",", "0"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SmartMod", "[", RowBox[{"num_", ",", "d_", ",", "var_"}], "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Mod", "[", RowBox[{"num", ",", "d"}], "]"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"var", "\[Element]", "Integers"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SmartMax", "[", RowBox[{"expr1_", ",", "expr2_", ",", "var_"}], "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Max", "[", RowBox[{"expr1", ",", "expr2"}], "]"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"var", ">", "0"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RealMod", "[", RowBox[{"l_", ",", "k_"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"l", ",", "k"}], "]"}], "==", "0"}], ",", "k", ",", RowBox[{"Mod", "[", RowBox[{"l", ",", "k"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteInModForm", "[", RowBox[{"num_", ",", "div_", ",", "var_Symbol"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"quotient", "=", RowBox[{"Floor", "[", RowBox[{"num", "/", "div"}], "]"}]}], ",", RowBox[{"remainder", "=", RowBox[{"Mod", "[", RowBox[{"num", ",", "div"}], "]"}]}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"remainder", "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"quotient", "-", "1"}], ")"}], "var"}], "+", "div"}], ",", RowBox[{ RowBox[{"quotient", " ", "var"}], "+", "remainder"}]}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.433858365578125*^9, 3.43385836575*^9}, { 3.433858413875*^9, 3.43385841403125*^9}, {3.43386543771875*^9, 3.43386545475*^9}, {3.43386549784375*^9, 3.43386550103125*^9}, { 3.434043534421875*^9, 3.434043558328125*^9}, {3.43410398275*^9, 3.434103998046875*^9}, 3.434104031015625*^9, {3.434116905515625*^9, 3.434117021609375*^9}, 3.43412430765625*^9}], Cell[BoxData[ RowBox[{ RowBox[{"ExtendList", "[", RowBox[{"L_", ",", "k_"}], "]"}], ":=", RowBox[{"Merge", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"L", "+", RowBox[{"i", "*", RowBox[{"Last", "[", "L", "]"}]}]}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", RowBox[{"k", "-", "1"}]}], "}"}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.43412469428125*^9, 3.434124758984375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"CheckEquality", "[", RowBox[{"expr1_", ",", "expr2_", ",", "var_"}], "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"expr1", "\[Equal]", "expr2"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"var", "\[Element]", "Integers"}], ",", RowBox[{"var", ">", "0"}]}], "}"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4341210063125*^9, 3.434121068734375*^9}}], Cell[TextData[{ "In the following, we are assuming we are dealing with a number of the form \ ", StyleBox["kq + r", FontSlant->"Italic"], ", and we want to subtract one and yield a new expression of the form ", StyleBox["k'q + r'", FontSlant->"Italic"], "." }], "Text", CellChangeTimes->{{3.434120206453125*^9, 3.434120246546875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"MinusOne", "[", "L_", "]"}], ":=", RowBox[{"RemoveFromList", "[", RowBox[{ RowBox[{"L", "-", "1"}], ",", RowBox[{"{", "0", "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RandomIntegerNot", "[", RowBox[{ RowBox[{"{", RowBox[{"i_", ",", "i_"}], "}"}], ",", "i_"}], "]"}], ":=", RowBox[{"-", "1"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RandomIntegerNot", "[", RowBox[{ RowBox[{"{", RowBox[{"a_", ",", "b_"}], "}"}], ",", "i_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"k", "=", RowBox[{"RandomInteger", "[", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"k", "\[Equal]", "i"}], ",", RowBox[{"RandomIntegerNot", "[", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}], ",", "i"}], "]"}], ",", "k"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.4314388654375*^9, 3.431438890421875*^9}, { 3.431687290984375*^9, 3.431687295828125*^9}, {3.431687404640625*^9, 3.431687464203125*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "This is the crux of this program - ", StyleBox["MaxAvoidSize", FontWeight->"Plain"], " is the recursive definition. " }], "Subsection", CellChangeTimes->{{3.434208633609375*^9, 3.4342086629375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{ RowBox[{"n_", "?", "Negative"}], ",", "_", ",", "_"}], "]"}], ":=", "0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"0", ",", "_", ",", "_"}], "]"}], ":=", "0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"1", ",", "\[CapitalDelta]_", ",", "S_"}], "]"}], ":=", RowBox[{"Boole", "[", RowBox[{"!", RowBox[{"MemberQ", "[", RowBox[{"S", ",", "1"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"n_", ",", "\[CapitalDelta]_", ",", "S_"}], "]"}], ":=", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}], "=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"S1", "=", RowBox[{"MinusOne", "[", "S", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"S", ",", "1"}], "]"}], ",", RowBox[{"MaxAvoidSize", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "\[CapitalDelta]", ",", "S1"}], "]"}], ",", RowBox[{"Max", "[", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "\[CapitalDelta]", ",", "S1"}], "]"}], ",", RowBox[{"1", "+", RowBox[{"MaxAvoidSize", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "\[CapitalDelta]", ",", RowBox[{"\[CapitalDelta]", "\[Union]", "S1"}]}], "]"}]}]}], "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"n_", ",", "\[CapitalDelta]_"}], "]"}], ":=", RowBox[{"MaxAvoidSize", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"{", "}"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.43428835296875*^9, 3.434288432109375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n_", ",", "\[CapitalDelta]_", ",", "S_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"i", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n_", ",", "\[CapitalDelta]_"}], "]"}], ":=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"{", "}"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.43384854434375*^9, 3.43384854471875*^9}, { 3.43428843928125*^9, 3.43428845878125*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "These are methods that find out the structure of the sequences obtained \ from ", StyleBox["MaxAvoidSizeSequence", FontWeight->"Plain"], " - ", StyleBox["OffsetAndPeriodGeneral", FontWeight->"Plain"], " say how long it takes for the \"period\" to start and what the \"period\" \ actually is - remember it's not actually a period because there is no direct \ repetition, but there is repetition of the increments in the sequence. " }], "Subsection", CellChangeTimes->{{3.434208679859375*^9, 3.434208700734375*^9}, { 3.4342087384375*^9, 3.434208787796875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"RepetitiveQ", "[", RowBox[{"L_", ",", "n_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"now", "=", RowBox[{"Drop", "[", RowBox[{"L", ",", RowBox[{"-", RowBox[{"Mod", "[", RowBox[{ RowBox[{"Length", "[", "L", "]"}], ",", "n"}], "]"}]}]}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"RepeatList", "[", RowBox[{ RowBox[{"Take", "[", RowBox[{"L", ",", "n"}], "]"}], ",", RowBox[{"Floor", "[", RowBox[{ RowBox[{"Length", "[", "L", "]"}], "/", "n"}], "]"}]}], "]"}], "\[Equal]", "now"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MinimalPeriod", "[", RowBox[{"L_", ",", "final_", ",", "final_"}], "]"}], ":=", RowBox[{"-", "1"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MinimalPeriod", "[", RowBox[{"L_", ",", "f_", ",", "final_"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"RepetitiveQ", "[", RowBox[{"L", ",", "f"}], "]"}], ",", "f", ",", RowBox[{"MinimalPeriod", "[", RowBox[{"L", ",", RowBox[{"f", "+", "1"}], ",", "final"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MinimalPeriod", "[", "L_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Union", "[", "L", "]"}], "]"}], "\[Equal]", "1"}], ",", "1", ",", RowBox[{"MinimalPeriod", "[", RowBox[{"L", ",", "2", ",", RowBox[{ RowBox[{"Floor", "[", RowBox[{ RowBox[{"Length", "[", "L", "]"}], "/", "2"}], "]"}], "+", "1"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RepetitiveQ", "[", "L_", "]"}], ":=", RowBox[{ RowBox[{"MinimalPeriod", "[", "L", "]"}], "\[NotEqual]", RowBox[{"-", "1"}]}]}]}], "Input", CellChangeTimes->{{3.433858355921875*^9, 3.43385835634375*^9}, { 3.43500725009375*^9, 3.435007253765625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"L_List", ",", "diff_List", ",", "final_", ",", "final_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"L_List", ",", "diff_List", ",", "f_", ",", "final_"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"diff", "[", RowBox[{"[", RowBox[{"f", "+", "1"}], "]"}], "]"}], "\[Equal]", "1"}], "&&", RowBox[{"RepetitiveQ", "[", RowBox[{"Drop", "[", RowBox[{"diff", ",", "f"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"f", ",", RowBox[{"MinimalPeriod", "[", RowBox[{"Drop", "[", RowBox[{"diff", ",", "f"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"L", ",", "diff", ",", RowBox[{"f", "+", "1"}], ",", "final"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OffsetAndPeriodGeneral", "[", "L_List", "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"diff", "=", RowBox[{"DifferenceSequence", "[", "L", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"RepetitiveQ", "[", "diff", "]"}], "&&", RowBox[{ RowBox[{"L", "[", RowBox[{"[", "1", "]"}], "]"}], "\[NotEqual]", "0"}]}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"MinimalPeriod", "[", "diff", "]"}]}], "}"}], ",", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"L", ",", "diff", ",", "0", ",", RowBox[{"Floor", "[", RowBox[{ RowBox[{"Length", "[", "L", "]"}], "/", "2"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"N_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"candidate", "=", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", "S"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"candidate", ",", RowBox[{"-", "1"}]}], "]"}], ",", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{ RowBox[{"N", "+", "50"}], ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", "candidate"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}]}], "Input", CellChangeTimes->{{3.433858398625*^9, 3.433858399078125*^9}, { 3.433859101390625*^9, 3.433859224171875*^9}, {3.43422354778125*^9, 3.43422367525*^9}, {3.434223710171875*^9, 3.4342237105625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"FindRatio", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"op", "=", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"op", "\[Equal]", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], ",", RowBox[{"FindRatio", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"L", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Plus", "@@", "op"}], ")"}], "+", "5"}], ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"L", "[", RowBox[{"[", RowBox[{ RowBox[{"First", "[", "op", "]"}], "+", RowBox[{"Last", "[", "op", "]"}], "+", "2"}], "]"}], "]"}], "-", RowBox[{"L", "[", RowBox[{"[", RowBox[{ RowBox[{"First", "[", "op", "]"}], "+", "2"}], "]"}], "]"}]}], ")"}], "/", RowBox[{"Last", "[", "op", "]"}]}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FindRatio", "[", "\[CapitalDelta]_List", "]"}], ":=", RowBox[{"FindRatio", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", RowBox[{"{", "}"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.4353340203125*^9, 3.43533415940625*^9}, { 3.435334375890625*^9, 3.43533448975*^9}, {3.43533454975*^9, 3.435334598390625*^9}}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.43533461096875*^9, 3.43533461459375*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FindRatio", "[", RowBox[{"3", ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "6"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.435334390015625*^9, 3.435334393703125*^9}, { 3.435334559640625*^9, 3.435334562375*^9}, {3.435334601390625*^9, 3.4353346058125*^9}}], Cell[BoxData[ FractionBox["1", "4"]], "Output", CellChangeTimes->{ 3.43533440878125*^9, {3.43533456315625*^9, 3.435334606171875*^9}, 3.44206025171875*^9, 3.44216028325*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["WriteEquations", FontWeight->"Plain"], " will write all of the equations necessary to find out the things necessary \ for some given ", StyleBox["\[CapitalDelta]", FontWeight->"Plain", FontSlant->"Italic"], " and ", StyleBox["S", FontWeight->"Plain", FontSlant->"Italic"], " - in these cases ", StyleBox["\[CapitalDelta]", FontWeight->"Plain", FontSlant->"Italic"], " will always be the same but it may be necessary to find out what's going \ on with ", StyleBox["S", FontWeight->"Plain", FontSlant->"Italic"], "." }], "Subsection", CellChangeTimes->{{3.43386887159375*^9, 3.433868881890625*^9}, { 3.434208797375*^9, 3.43420888209375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"WriteEquations", "[", RowBox[{ "n_Symbol", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "doneS_List", ",", "leftS_List", ",", "eqns_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"S1", "=", RowBox[{"MinusOne", "[", "S", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"S", ",", "1"}], "]"}], ",", RowBox[{"WriteEquations2", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"Append", "[", RowBox[{"doneS", ",", "S"}], "]"}], ",", RowBox[{"Merge", "[", RowBox[{"leftS", ",", RowBox[{"{", "S1", "}"}]}], "]"}], ",", RowBox[{"Append", "[", RowBox[{"eqns", ",", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"n", ",", "S"}], "]"}], "\[Equal]", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "S1"}], "]"}]}]}], "]"}]}], "]"}], ",", RowBox[{"WriteEquations2", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"Append", "[", RowBox[{"doneS", ",", "S"}], "]"}], ",", RowBox[{"Merge", "[", RowBox[{"leftS", ",", RowBox[{"{", RowBox[{"S1", ",", RowBox[{"S1", "\[Union]", "\[CapitalDelta]"}]}], "}"}]}], "]"}], ",", RowBox[{"Append", "[", RowBox[{"eqns", ",", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"n", ",", "S"}], "]"}], "\[Equal]", RowBox[{"Max", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "S1"}], "]"}], ",", RowBox[{"1", "+", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", RowBox[{"S1", "\[Union]", "\[CapitalDelta]"}]}], "]"}]}]}], "]"}]}]}], "]"}]}], "]"}]}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.43386767059375*^9, 3.433867671140625*^9}, { 3.43386818475*^9, 3.433868308984375*^9}, {3.4338684025*^9, 3.433868413671875*^9}, {3.433868542296875*^9, 3.433868544078125*^9}, { 3.43386884484375*^9, 3.43386884859375*^9}, {3.43387012909375*^9, 3.433870165375*^9}, {3.43387047165625*^9, 3.43387051078125*^9}, { 3.43387056040625*^9, 3.433870570046875*^9}, {3.43387133325*^9, 3.43387133634375*^9}, {3.433871481875*^9, 3.433871489171875*^9}, 3.434288500828125*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteEquations2", "[", RowBox[{"n_Symbol", ",", "\[CapitalDelta]_List", ",", "doneS_List", ",", RowBox[{"{", "}"}], ",", "eqns_List"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"Sort", "[", "doneS", "]"}], ",", RowBox[{"Sort", "[", "eqns", "]"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteEquations2", "[", RowBox[{ "n_Symbol", ",", "\[CapitalDelta]_List", ",", "doneS_List", ",", "leftS_List", ",", "eqns_List"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"doneS", ",", RowBox[{"First", "[", "leftS", "]"}]}], "]"}], ",", RowBox[{"WriteEquations2", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "doneS", ",", RowBox[{"Rest", "[", "leftS", "]"}], ",", "eqns"}], "]"}], ",", RowBox[{"WriteEquations", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"First", "[", "leftS", "]"}], ",", "doneS", ",", RowBox[{"Rest", "[", "leftS", "]"}], ",", "eqns"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.4314390814375*^9, 3.431439179390625*^9}, 3.431439377609375*^9, {3.43168605925*^9, 3.4316860610625*^9}, { 3.433868417578125*^9, 3.433868465234375*^9}, {3.433868534734375*^9, 3.4338685389375*^9}, {3.433868647609375*^9, 3.433868649796875*^9}, { 3.433869875453125*^9, 3.4338698758125*^9}, {3.433869928734375*^9, 3.43386995484375*^9}, {3.434110559125*^9, 3.4341105650625*^9}, { 3.434110966796875*^9, 3.434110969109375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteEquations", "[", RowBox[{"n_Symbol", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"Last", "[", RowBox[{"WriteEquations", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteEquations", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteEquations", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetUsedS", "[", RowBox[{"n_Symbol", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"First", "[", RowBox[{"WriteEquations", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"First", "[", RowBox[{"WriteEquations", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetMaxOffset", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"possS", "=", RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"Max", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"First", "[", RowBox[{"OffsetAndPeriodGeneral", "[", RowBox[{"\[CapitalDelta]", ",", "s"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"s", ",", "possS"}], "}"}]}], "]"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.431439399921875*^9, 3.43143942596875*^9}, { 3.433868503875*^9, 3.43386853209375*^9}, {3.434110524015625*^9, 3.43411060290625*^9}, {3.4341183368125*^9, 3.434118350765625*^9}, { 3.434223024421875*^9, 3.434223042578125*^9}, {3.434223123265625*^9, 3.4342231283125*^9}, {3.434223766015625*^9, 3.434223820234375*^9}}], Cell[TextData[{ StyleBox["RandomSystem", FontWeight->"Bold"], " was used for a little bit of testing, but it's not really useful anymore." }], "Text", CellChangeTimes->{{3.434209065765625*^9, 3.43420907996875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"RandomSystem", "[", RowBox[{"i_", ",", "i_", ",", "final_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"k", "=", RowBox[{"RandomIntegerNot", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "i"}], "}"}], ",", "i"}], "]"}]}], "}"}], ",", RowBox[{"Append", "[", RowBox[{"final", ",", RowBox[{ RowBox[{"a", "[", RowBox[{"n", ",", "i"}], "]"}], "\[Equal]", RowBox[{"Max", "[", RowBox[{ RowBox[{"a", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "i"}], "]"}], ",", RowBox[{"1", "+", RowBox[{"a", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "k"}], "]"}]}]}], "]"}]}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RandomSystem", "[", RowBox[{"i_", ",", "j_", ",", "final_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"k", "=", RowBox[{"RandomIntegerNot", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "i"}], "}"}], ",", "j"}], "]"}]}], "}"}], ",", RowBox[{"RandomSystem", "[", RowBox[{"i", ",", RowBox[{"j", "+", "1"}], ",", RowBox[{"Append", "[", RowBox[{"final", ",", RowBox[{ RowBox[{"a", "[", RowBox[{"n", ",", "j"}], "]"}], "\[Equal]", RowBox[{"Max", "[", RowBox[{ RowBox[{"a", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "j"}], "]"}], ",", RowBox[{"1", "+", RowBox[{"a", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", "k"}], "]"}]}]}], "]"}]}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"RandomSystem", "[", "i_", "]"}], ":=", RowBox[{"RandomSystem", "[", RowBox[{"i", ",", "1", ",", RowBox[{"{", "}"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.431439190265625*^9, 3.431439192140625*^9}, { 3.4316865720625*^9, 3.4316866040625*^9}, {3.4316870719375*^9, 3.43168707334375*^9}, {3.43168710553125*^9, 3.431687114625*^9}, { 3.43168716821875*^9, 3.4316871721875*^9}, {3.431687218921875*^9, 3.431687233484375*^9}, {3.431687328890625*^9, 3.431687392046875*^9}, { 3.4316874874375*^9, 3.43168757978125*^9}}], Cell[TextData[{ StyleBox["WriteFunction", FontWeight->"Bold"], " is the main tool we will use that will write us the guessed piecewise \ function. You can also specify to repeat the function as many times as you \ wish, to get a period that is a specific multiple of the \"natural\" period.\n\ ", StyleBox["This is not an easy function to write!\nWe require that our list L \ ", FontWeight->"Bold"] }], "Text", CellChangeTimes->{{3.43410314809375*^9, 3.4341031666875*^9}, { 3.434127904953125*^9, 3.4341279238125*^9}, {3.434293060875*^9, 3.434293066515625*^9}, {3.43429442471875*^9, 3.434294428890625*^9}}], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ RowBox[{"Crap", ":", " ", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "var_"}], "]"}]}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"len", "=", RowBox[{"Length", "[", "L", "]"}]}], ",", RowBox[{"last", "=", RowBox[{"Last", "[", "L", "]"}]}], ",", RowBox[{"mod", "=", RowBox[{"RealMod", "[", RowBox[{"startpoint", ",", RowBox[{"Length", "[", "L", "]"}]}], "]"}]}]}], "}"}], ",", RowBox[{"Merge", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"A", "[", RowBox[{ RowBox[{"var", " ", "len"}], " ", "+", " ", "k"}], "]"}], ",", "\"\<=\>\"", ",", RowBox[{"Simplify", "[", RowBox[{"startvalue", "+", RowBox[{ RowBox[{"(", RowBox[{"var", "-", RowBox[{"Floor", "[", RowBox[{"startpoint", "/", "len"}], "]"}], "-", "1"}], ")"}], RowBox[{"(", RowBox[{"last", "+", "1"}], ")"}]}], "+", RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "k", "+", "1"}], "]"}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"mod", "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"A", "[", RowBox[{ RowBox[{"var", " ", "len"}], " ", "+", " ", "k"}], "]"}], ",", "\"\<=\>\"", ",", RowBox[{"startvalue", "+", RowBox[{ RowBox[{"(", RowBox[{"var", "-", RowBox[{"Floor", "[", RowBox[{"startpoint", "/", "len"}], "]"}]}], ")"}], " ", RowBox[{"(", RowBox[{"last", "+", "1"}], ")"}]}], "+", RowBox[{"L", "[", RowBox[{"[", RowBox[{"k", "-", "mod", "+", "1"}], "]"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "mod", ",", "len"}], "}"}]}], "]"}]}], "]"}]}], "]"}]}], " ", "*)"}]], "Input", CellChangeTimes->{{3.4342945705625*^9, 3.4342945956875*^9}}], Cell["\<\ WriteFunctionNiceInput is a method that was added at the end to help out. We \ want to give piecewise functions based on remainder, so we talk of numbers of \ the form 6k+1, 6k+2, ... , 6k+6. So, in WriteFunctionNiceInput, we assume \ that startpoint is equal to 1 modulo the period, which is also give as input. \ Our list is still in the same format, where we start at 0 and increase. \ \>", "Text", CellChangeTimes->{{3.43436572771875*^9, 3.434365809578125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionNiceInputWithJump", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "len_Integer", ",", "var_", ",", "jump_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"offset", "=", RowBox[{"Floor", "[", RowBox[{"startpoint", "/", "len"}], "]"}]}], ",", RowBox[{"last", "=", RowBox[{"Last", "[", "L", "]"}]}]}], "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"A", "[", RowBox[{ RowBox[{"var", " ", "len"}], " ", "+", " ", "k"}], "]"}], ",", "\"\<=\>\"", ",", RowBox[{"Expand", "[", RowBox[{"startvalue", "+", RowBox[{ RowBox[{"(", RowBox[{"var", "-", "offset"}], ")"}], " ", RowBox[{"(", RowBox[{"last", "+", "jump"}], ")"}]}], "+", RowBox[{"L", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "len"}], "}"}]}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.434366717140625*^9, 3.434366734390625*^9}, { 3.434366778875*^9, 3.434366896515625*^9}, {3.434367599796875*^9, 3.4343676135*^9}, {3.43436771759375*^9, 3.43436772828125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"len", "=", RowBox[{"Length", "[", "L", "]"}]}], ",", RowBox[{"last", "=", RowBox[{"Last", "[", "L", "]"}]}], ",", RowBox[{"mod", "=", RowBox[{"RealMod", "[", RowBox[{"startpoint", ",", RowBox[{"Length", "[", "L", "]"}]}], "]"}]}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"newL", "=", RowBox[{"Merge", "[", RowBox[{ RowBox[{"Take", "[", RowBox[{"L", ",", RowBox[{"-", RowBox[{"(", RowBox[{"mod", "-", "1"}], ")"}]}]}], "]"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"L", ",", RowBox[{"len", "-", "mod", "+", "1"}]}], "]"}], "+", "last", "+", "1"}]}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"mod", "\[Equal]", "1"}], ",", RowBox[{"WriteFunctionNiceInputWithJump", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "len", ",", "var", ",", "1"}], "]"}], ",", RowBox[{"WriteFunctionNiceInputWithJump", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"startpoint", "+", "len", "-", "mod", "+", "1"}], ",", RowBox[{"startvalue", "+", RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "2"}], "]"}], "]"}]}]}], "}"}], ",", RowBox[{"newL", "-", RowBox[{"First", "[", "newL", "]"}]}], ",", "len", ",", "var", ",", RowBox[{ RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "2"}], "]"}], "]"}], "-", RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "1"}], "]"}], "]"}]}]}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_", ",", "startvalue_"}], "}"}], ",", "L_"}], "]"}], ":=", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"l", "=", RowBox[{"Length", "[", "L", "]"}]}], ",", RowBox[{"m", "=", RowBox[{ RowBox[{"Length", "[", "L", "]"}], "*", "repeats"}]}], ",", RowBox[{"funs", "=", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "var"}], "]"}]}]}], "}"}], ",", RowBox[{"Merge", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"A", "[", RowBox[{ RowBox[{"var", " ", "m"}], "+", RowBox[{"k", "*", "l"}], "+", "i"}], "]"}], " ", ",", "\"\<=\>\"", ",", RowBox[{"Expand", "[", RowBox[{ RowBox[{"funs", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "/.", RowBox[{"var", "\[Rule]", RowBox[{ RowBox[{"repeats", " ", "var"}], "+", "k"}]}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", RowBox[{"repeats", "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "l"}], "}"}]}], "]"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.43385960496875*^9, 3.433859629625*^9}, { 3.433859660484375*^9, 3.4338597191875*^9}, {3.43386073053125*^9, 3.4338607463125*^9}, {3.433860983375*^9, 3.433860999890625*^9}, { 3.43386104434375*^9, 3.4338610459375*^9}, {3.433861256609375*^9, 3.43386135371875*^9}, {3.433861411546875*^9, 3.433861435515625*^9}, { 3.433861636734375*^9, 3.433861722234375*^9}, {3.43386181925*^9, 3.433861825796875*^9}, {3.4338618568125*^9, 3.433861894828125*^9}, { 3.4338642785625*^9, 3.433864280671875*^9}, {3.433864314140625*^9, 3.433864314328125*^9}, {3.433865803046875*^9, 3.4338658801875*^9}, { 3.433865972484375*^9, 3.433865992171875*^9}, {3.433866189734375*^9, 3.433866248*^9}, {3.43404595146875*^9, 3.43404596046875*^9}, { 3.434046324671875*^9, 3.434046329453125*^9}, {3.43404650034375*^9, 3.434046590890625*^9}, {3.43404736840625*^9, 3.434047371765625*^9}, { 3.43404760515625*^9, 3.434047615796875*^9}, {3.43404768178125*^9, 3.43404769484375*^9}, {3.4340481845*^9, 3.43404822371875*^9}, { 3.434103816015625*^9, 3.434103850171875*^9}, {3.43410391459375*^9, 3.434103914765625*^9}, {3.434103962578125*^9, 3.4341039650625*^9}, { 3.434104011828125*^9, 3.434104012484375*^9}, {3.4341040636875*^9, 3.43410406675*^9}, {3.43410415946875*^9, 3.43410416621875*^9}, { 3.434104339546875*^9, 3.4341043416875*^9}, {3.434104435109375*^9, 3.43410446834375*^9}, {3.43410452890625*^9, 3.434104534203125*^9}, { 3.434104598109375*^9, 3.434104602609375*^9}, {3.434104633890625*^9, 3.434104640953125*^9}, {3.4341046791875*^9, 3.434104698625*^9}, { 3.434104736734375*^9, 3.43410477171875*^9}, {3.434116254609375*^9, 3.43411626209375*^9}, {3.434116311140625*^9, 3.434116313625*^9}, 3.434124664625*^9, {3.434124790640625*^9, 3.434124858859375*^9}, { 3.43412515553125*^9, 3.434125403921875*^9}, {3.434125452234375*^9, 3.434125472921875*^9}, {3.43412574340625*^9, 3.4341257464375*^9}, { 3.434125880890625*^9, 3.4341259745*^9}, {3.4341260096875*^9, 3.43412601178125*^9}, {3.434126341203125*^9, 3.434126342140625*^9}, { 3.43412645721875*^9, 3.434126474171875*^9}, {3.4342930785625*^9, 3.434293120265625*^9}, {3.434293523484375*^9, 3.434293541296875*^9}, 3.4342935799375*^9, {3.4342936159375*^9, 3.43429362275*^9}, { 3.434293689046875*^9, 3.434293693203125*^9}, {3.43429385690625*^9, 3.434293863328125*^9}, {3.43429392015625*^9, 3.43429392959375*^9}, { 3.434294068609375*^9, 3.434294083046875*^9}, {3.43429457615625*^9, 3.434294685671875*^9}, {3.43429475409375*^9, 3.434294832359375*^9}, { 3.434294869578125*^9, 3.43429487228125*^9}, {3.434294907296875*^9, 3.434294914*^9}, {3.4342950129375*^9, 3.434295025*^9}, {3.434295121*^9, 3.434295131015625*^9}, {3.434295272984375*^9, 3.43429527571875*^9}, { 3.4342953654375*^9, 3.43429539740625*^9}, {3.434295684703125*^9, 3.4342956931875*^9}, {3.4342957868125*^9, 3.434295792375*^9}, { 3.43429726759375*^9, 3.434297271453125*^9}, {3.43429737090625*^9, 3.43429737103125*^9}, {3.434365719671875*^9, 3.434365725203125*^9}, { 3.434365825203125*^9, 3.43436586421875*^9}, {3.434366257859375*^9, 3.434366369234375*^9}, {3.434366484484375*^9, 3.43436651828125*^9}, { 3.434366599671875*^9, 3.434366641125*^9}, {3.434366675203125*^9, 3.434366712859375*^9}, {3.434366750359375*^9, 3.434366769484375*^9}, { 3.43436725246875*^9, 3.434367253125*^9}, {3.43436762965625*^9, 3.434367632296875*^9}, {3.434367741109375*^9, 3.4343677776875*^9}, 3.434367810171875*^9, {3.434367847109375*^9, 3.43436784825*^9}, { 3.43436806303125*^9, 3.434368065671875*^9}, {3.4344634310625*^9, 3.43446343290625*^9}, {3.434463560578125*^9, 3.434463562828125*^9}, { 3.43446386309375*^9, 3.434463895265625*^9}, {3.434464254796875*^9, 3.434464254984375*^9}, {3.43446429071875*^9, 3.4344642975*^9}}], Cell[TextData[{ StyleBox["WriteFunctionVerbose", FontWeight->"Bold"], " remembers the scenario we're in, and names the function in a more normal \ manner." }], "Text", CellChangeTimes->{{3.434127935125*^9, 3.434127955140625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionVerboseNiceInputWithJump", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "len_Integer", ",", "var_", ",", "jump_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"offset", "=", RowBox[{"Floor", "[", RowBox[{"startpoint", "/", "len"}], "]"}]}], ",", RowBox[{"last", "=", RowBox[{"Last", "[", "L", "]"}]}]}], "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"var", " ", "len"}], " ", "+", " ", "k"}], ",", "S"}], "]"}], ",", "\"\<=\>\"", ",", RowBox[{"Expand", "[", RowBox[{"startvalue", "+", RowBox[{ RowBox[{"(", RowBox[{"var", "-", "offset"}], ")"}], " ", RowBox[{"(", RowBox[{"last", "+", "jump"}], ")"}]}], "+", RowBox[{"L", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "len"}], "}"}]}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.434368450296875*^9, 3.43436848590625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "var_", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"len", "=", RowBox[{"Length", "[", "L", "]"}]}], ",", RowBox[{"last", "=", RowBox[{"Last", "[", "L", "]"}]}], ",", RowBox[{"mod", "=", RowBox[{"RealMod", "[", RowBox[{"startpoint", ",", RowBox[{"Length", "[", "L", "]"}]}], "]"}]}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"newL", "=", RowBox[{"Merge", "[", RowBox[{ RowBox[{"Take", "[", RowBox[{"L", ",", RowBox[{"-", RowBox[{"(", RowBox[{"mod", "-", "1"}], ")"}]}]}], "]"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"L", ",", RowBox[{"len", "-", "mod", "+", "1"}]}], "]"}], "+", "last", "+", "1"}]}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"mod", "\[Equal]", "1"}], ",", RowBox[{"WriteFunctionVerboseNiceInputWithJump", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "len", ",", "var", ",", "1", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", RowBox[{"WriteFunctionVerboseNiceInputWithJump", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"startpoint", "+", "len", "-", "mod", "+", "1"}], ",", RowBox[{"startvalue", "+", RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "2"}], "]"}], "]"}]}]}], "}"}], ",", RowBox[{"newL", "-", RowBox[{"First", "[", "newL", "]"}]}], ",", "len", ",", "var", ",", RowBox[{ RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "2"}], "]"}], "]"}], "-", RowBox[{"L", "[", RowBox[{"[", RowBox[{"len", "-", "mod", "+", "1"}], "]"}], "]"}]}], ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "q", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43411631653125*^9, 3.434116379265625*^9}, { 3.434116434046875*^9, 3.4341164738125*^9}, {3.43411652865625*^9, 3.434116533*^9}, {3.43412579215625*^9, 3.434125793046875*^9}, { 3.434128030296875*^9, 3.434128036453125*^9}, {3.434296129140625*^9, 3.434296139609375*^9}, {3.43429719121875*^9, 3.434297205203125*^9}, { 3.43429739121875*^9, 3.43429739125*^9}, {3.43436850303125*^9, 3.434368563140625*^9}, 3.43446463440625*^9}], Cell["\<\ And, as before, we can repeat . . . some people may be frightened at the \ prospect of overloading, but if done right it will allow for easier \ application of code.\ \>", "Text", CellChangeTimes->{{3.43412803690625*^9, 3.434128070046875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "var_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"l", "=", RowBox[{"Length", "[", "L", "]"}]}], ",", RowBox[{"m", "=", RowBox[{ RowBox[{"Length", "[", "L", "]"}], "*", "repeats"}]}], ",", RowBox[{"funs", "=", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "var"}], "]"}]}]}], "}"}], ",", RowBox[{"Merge", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"var", " ", "m"}], "+", RowBox[{"k", "*", "l"}], "+", "i"}], ",", "S"}], "]"}], " ", ",", "\"\<=\>\"", ",", RowBox[{"Expand", "[", RowBox[{ RowBox[{"funs", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "/.", RowBox[{"var", "\[Rule]", RowBox[{ RowBox[{"repeats", " ", "var"}], "+", "k"}]}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", RowBox[{"repeats", "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "l"}], "}"}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint_Integer", ",", "startvalue_Integer"}], "}"}], ",", "L_List", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{"startpoint", ",", "startvalue"}], "}"}], ",", "L", ",", "q", ",", "\[CapitalDelta]", ",", "S", ",", "repeats"}], "]"}]}]}], "Input", CellChangeTimes->{{3.434128073609375*^9, 3.43412809884375*^9}, { 3.434128136671875*^9, 3.43412818625*^9}, 3.434296167171875*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"seq", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"OP", "=", RowBox[{"OffsetAndPeriodGeneral", "[", "seq", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}], "||", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}]}], ",", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}], ",", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"seq", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}]}], "]"}], "-", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], ",", "var"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n_", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"seq", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"OP", "=", RowBox[{"OffsetAndPeriodGeneral", "[", "seq", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}], "||", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}]}], ",", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "repeats"}], "]"}], ",", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"seq", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}]}], "]"}], "-", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], ",", "var", ",", "repeats"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "repeats"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "repeats"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "repeats"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43386234428125*^9, 3.43386244925*^9}, { 3.433863638046875*^9, 3.433863758734375*^9}, {3.433863799828125*^9, 3.433863829484375*^9}, {3.43386391653125*^9, 3.433863916765625*^9}, { 3.433864650390625*^9, 3.43386467134375*^9}, {3.433865894265625*^9, 3.433865943734375*^9}, {3.433866252375*^9, 3.433866391546875*^9}, { 3.4338664350625*^9, 3.43386644975*^9}, {3.43386648628125*^9, 3.433866569328125*^9}, {3.433866600953125*^9, 3.43386660171875*^9}, { 3.433866810140625*^9, 3.433866856296875*^9}, {3.433868317546875*^9, 3.433868347375*^9}, {3.4340473820625*^9, 3.434047390390625*^9}, { 3.43411655078125*^9, 3.4341165553125*^9}, {3.434123707*^9, 3.43412373003125*^9}, {3.4341238640625*^9, 3.434123864546875*^9}, { 3.4341254875*^9, 3.434125654640625*^9}, {3.434219352859375*^9, 3.434219375765625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"n_", ",", "\[CapitalDelta]_", ",", "S_", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"seq", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"OP", "=", RowBox[{"OffsetAndPeriodGeneral", "[", "seq", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}], "||", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}]}], ",", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}], ",", RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"seq", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}]}], "]"}], "-", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], ",", "var", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"\[CapitalDelta]_", ",", "S_"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43421881084375*^9, 3.43421881709375*^9}}], Cell["and we can repeat. . . ", "Text", CellChangeTimes->{{3.434218821828125*^9, 3.434218826296875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{ "n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"seq", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"OP", "=", RowBox[{"OffsetAndPeriodGeneral", "[", "seq", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}], "||", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}]}], ",", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}], ",", RowBox[{"WriteFunctionVerbose", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"seq", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], ",", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"OP", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}]}], "]"}], "-", RowBox[{"seq", "[", RowBox[{"[", RowBox[{ RowBox[{"OP", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "1"}], "]"}], "]"}]}], ",", "var", ",", "\[CapitalDelta]", ",", "S", ",", "repeats"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "repeats"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{ "n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "repeats"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "repeats"}], "]"}]}]}], "Input", CellChangeTimes->{{3.434218790984375*^9, 3.434218833109375*^9}}], Cell[TextData[{ StyleBox["TotalFunctionFromSets", FontWeight->"Bold"], " is like repeating the function, but here we specify the total length of \ the function that we want - if things are not divisible, then you will get \ screwy results!" }], "Text", CellChangeTimes->{{3.43412651915625*^9, 3.434126556859375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"TotalFunctionFromSets", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", RowBox[{"totallen", "/", RowBox[{"Length", "[", "funs", "]"}]}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TotalFunctionFromSets", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"TotalFunctionFromSets", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "totallen"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TotalFunctionFromSets", "[", RowBox[{ "n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"TotalFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "totallen"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TotalFunctionFromSets", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"TotalFunctionFromSets", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "totallen"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43412415190625*^9, 3.434124152453125*^9}, { 3.434126586171875*^9, 3.4341267101875*^9}}], Cell["and we can be verbose . . . ", "Text", CellChangeTimes->{{3.434128572953125*^9, 3.434128578359375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", RowBox[{"totallen", "/", RowBox[{"Length", "[", "funs", "]"}]}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "totallen"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{ "n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "totallen"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "totallen_Integer"}], "]"}], ":=", RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "totallen"}], "]"}]}]}], "Input", CellChangeTimes->{{3.4341285844375*^9, 3.43412862596875*^9}}], Cell[TextData[{ StyleBox["CommonLength", FontWeight->"Bold"], " inputs the difference set ", StyleBox["\[CapitalDelta]", FontSlant->"Italic"], " and the restricted set ", StyleBox["S", FontSlant->"Italic"], " and returns the number of mod-cases the piecewise functions should have \ for consistency. " }], "Text", CellChangeTimes->{{3.434218901046875*^9, 3.43421894815625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"UsedS", "=", RowBox[{"GetUsedS", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"LCM", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"Length", "[", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]", ",", "s"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"s", ",", "UsedS"}], "}"}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetPeriod", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"Length", "[", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}], "]"}]}]}], "Input", CellChangeTimes->{{3.434127117328125*^9, 3.434127245703125*^9}, { 3.434218893390625*^9, 3.43421889353125*^9}}], Cell["\<\ Once we know the common length, it will be useful to have the following:\ \>", "Text", CellChangeTimes->{{3.434219298203125*^9, 3.4342193225625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"CL", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"TotalFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "CL"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"n_", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43421932528125*^9, 3.4342193256875*^9}, { 3.434219411015625*^9, 3.434219484578125*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Here are methods that simply reiterate what's been done previously in string \ format. This will be of assistance when writing our automated proving \ program.\ \>", "Subsection", CellChangeTimes->{{3.4342188543125*^9, 3.434218884296875*^9}}], Cell[TextData[{ "This first instance of ", StyleBox["WriteAllFunctionsString", FontWeight->"Bold"], " takes as input the family of all restricted functions that we want to deal \ with." }], "Text", CellChangeTimes->{{3.434218980109375*^9, 3.4342190111875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", RowBox[{"{", "}"}], ",", "var_", ",", "finalstring_String"}], "]"}], ":=", "finalstring"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", RowBox[{"{", RowBox[{"f_", ",", "r___"}], "}"}], ",", "var_", ",", "finalstring_String"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", RowBox[{"{", "r", "}"}], ",", "var", ",", RowBox[{"finalstring", "<>", "\"\<\\n\\nFor \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"HoldForm", "[", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"N", ",", "f"}], "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<:\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"WriteFunctionFromSetsVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "f", ",", "var"}], "]"}], "]"}], ",", "TraditionalForm"}], "]"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.434110651953125*^9, 3.434110725625*^9}, { 3.434110817625*^9, 3.434110846796875*^9}, {3.4341108946875*^9, 3.434110954484375*^9}, {3.43411098459375*^9, 3.434111065703125*^9}, { 3.434111128453125*^9, 3.4341111420625*^9}, {3.434116676203125*^9, 3.43411667690625*^9}, {3.434128834171875*^9, 3.43412885659375*^9}, { 3.434129722421875*^9, 3.43412974078125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", "L_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "N", ",", "\[CapitalDelta]", ",", "L", ",", "var", ",", "\"\<\>\""}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", "L_List"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", "L", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"\[CapitalDelta]_List", ",", "L_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "L", ",", "var"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"\[CapitalDelta]_List", ",", "L_List"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "L", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43411109359375*^9, 3.43411109753125*^9}, { 3.434111147375*^9, 3.434111261625*^9}, {3.434129750625*^9, 3.434129765796875*^9}}], Cell["\<\ and we can repeat - from here on out we will deal with the total length as \ this will be somewhat easier to deal with . . .\ \>", "Text", CellChangeTimes->{{3.43412867209375*^9, 3.4341286954375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", RowBox[{"{", "}"}], ",", "var_", ",", "totallength_Integer", ",", "finalstring_String"}], "]"}], ":=", "finalstring"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", RowBox[{"{", RowBox[{"f_", ",", "r___"}], "}"}], ",", "var_", ",", "totallength_Integer", ",", "finalstring_String"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", RowBox[{"{", "r", "}"}], ",", "var", ",", "totallength", ",", RowBox[{"finalstring", "<>", "\"\<\\n\\nFor \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"HoldForm", "[", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"N", ",", "f"}], "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<:\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"TotalFunctionFromSetsVerbose", "[", RowBox[{ "\[CapitalDelta]", ",", "f", ",", "var", ",", "totallength"}], "]"}], "]"}], ",", "TraditionalForm"}], "]"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.434128702015625*^9, 3.43412881259375*^9}, { 3.43412886903125*^9, 3.43412889040625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "N_", ",", "\[CapitalDelta]_List", ",", "L_List", ",", "var_", ",", "totallength_Integer"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "N", ",", "\[CapitalDelta]", ",", "L", ",", "var", ",", "totallength", ",", "\"\<\>\""}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "N_", ",", "\[CapitalDelta]_List", ",", "L_List", ",", "totallength_Integer"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "N", ",", "\[CapitalDelta]", ",", "L", ",", "q", ",", "totallength", ",", "\"\<\>\""}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "\[CapitalDelta]_List", ",", "L_List", ",", "var_", ",", "totallength_Integer"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "n", ",", "\[CapitalDelta]", ",", "L", ",", "var", ",", "totallength", ",", "\"\<\>\""}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "\[CapitalDelta]_List", ",", "L_List", ",", "totallength_Integer"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{ "n", ",", "\[CapitalDelta]", ",", "L", ",", "q", ",", "totallength", ",", "\"\<\>\""}], "]"}]}]}], "Input", CellChangeTimes->{{3.434128900765625*^9, 3.434128970859375*^9}, { 3.434129919921875*^9, 3.434129920390625*^9}, 3.43412998246875*^9, { 3.43422003240625*^9, 3.434220038375*^9}}], Cell[TextData[{ StyleBox["WriteAllFunctionsFromStartingString", FontWeight->"Bold"], " first generates the possible sets ", StyleBox["S", FontSlant->"Italic"], " that will be involved; this is different than before, where we specified \ first which sets ", StyleBox["S", FontSlant->"Italic"], " would be involved." }], "Text", CellChangeTimes->{{3.43412898840625*^9, 3.43412901678125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", RowBox[{"GetUsedS", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", "var"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteAllFunctionsFromStartingString", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.434111406328125*^9, 3.434111475515625*^9}, { 3.434111530390625*^9, 3.4341115979375*^9}, {3.434129101421875*^9, 3.434129106*^9}, {3.4341291630625*^9, 3.43412916503125*^9}, { 3.43412920390625*^9, 3.43412920415625*^9}, {3.434220042859375*^9, 3.4342200455625*^9}}], Cell[TextData[{ StyleBox["WriteAllFunctionsEqualLengthString", FontWeight->"Bold"], " inputs at its rawest form simply the difference set ", StyleBox["\[CapitalDelta]", FontSlant->"Italic"], " and the initial restricted set ", StyleBox["S", FontSlant->"Italic"], ", and then generates all functions that are related and makes sure they \ each have the same length." }], "Text", CellChangeTimes->{{3.43421905334375*^9, 3.43421910359375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"WriteAllFunctionsEqualLengthString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", RowBox[{"GetUsedS", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", "var", ",", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsEqualLengthString", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"GetUsedS", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", "var", ",", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsEqualLengthString", "[", RowBox[{"N_", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", RowBox[{"GetUsedS", "[", RowBox[{"N", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", "q", ",", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteAllFunctionsEqualLengthString", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteAllFunctionsString", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", RowBox[{"GetUsedS", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", "q", ",", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.434129032328125*^9, 3.434129221015625*^9}, { 3.43428769040625*^9, 3.434287692671875*^9}}], Cell[TextData[{ StyleBox["GetAppropriateExpression ", FontWeight->"Bold"], "is extremely useful. We also have the ", StyleBox["GetAppropriateExpressionCL", FontWeight->"Bold"], " (Common Length) variant for when we want consistency." }], "Text", CellChangeTimes->{{3.43411991309375*^9, 3.4341199354375*^9}, { 3.43421919565625*^9, 3.43421922746875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"GetAppropriateExpression", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_Symbol", ",", "rem_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"funs", "[", RowBox[{"[", RowBox[{ RowBox[{"RealMod", "[", RowBox[{"rem", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], ",", "3"}], "]"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_Symbol", ",", "rem_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"funs", "[", RowBox[{"[", RowBox[{ RowBox[{"RealMod", "[", RowBox[{"rem", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], ",", "3"}], "]"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.434042726890625*^9, 3.434042763234375*^9}, { 3.434042845625*^9, 3.434042873125*^9}, {3.434042959953125*^9, 3.434042982640625*^9}, {3.43411749578125*^9, 3.4341175389375*^9}, { 3.434219222859375*^9, 3.43421925003125*^9}, {3.43421956221875*^9, 3.434219582640625*^9}, {3.434220112203125*^9, 3.434220115640625*^9}, { 3.434287966671875*^9, 3.43428797784375*^9}}], Cell[TextData[{ "We may run into issues where we need to replace ", StyleBox["q", FontSlant->"Italic"], " by ", StyleBox["q-1", FontSlant->"Italic"], "; in this case we'll use this simple modification of the preceding." }], "Text", CellChangeTimes->{{3.43422007496875*^9, 3.43422009815625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"GetAppropriateExpression", "[", RowBox[{ "\[CapitalDelta]_", ",", "S_", ",", "var_Symbol", ",", "expr_", ",", "rem_"}], "]"}], ":=", RowBox[{ RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"funs", "[", RowBox[{"[", RowBox[{ RowBox[{"RealMod", "[", RowBox[{"rem", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], ",", "3"}], "]"}], "]"}]}], "]"}], "/.", RowBox[{"var", "\[Rule]", "expr"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{ "\[CapitalDelta]_", ",", "S_", ",", "var_Symbol", ",", "expr_", ",", "rem_"}], "]"}], ":=", RowBox[{ RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"funs", "[", RowBox[{"[", RowBox[{ RowBox[{"RealMod", "[", RowBox[{"rem", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], ",", "3"}], "]"}], "]"}]}], "]"}], "/.", RowBox[{"var", "\[Rule]", "expr"}]}]}]}], "Input", CellChangeTimes->{{3.43422010546875*^9, 3.43422013746875*^9}}], Cell["\<\ Remember that from here on out we are imposing common lengths on all of our \ functions!\ \>", "Text", CellChangeTimes->{{3.43421967896875*^9, 3.434219695875*^9}}], Cell[TextData[{ StyleBox["VerifyFunction1", FontWeight->"Bold"], " assumes that ", StyleBox["1", FontSlant->"Italic"], " is in our set ", StyleBox["S", FontSlant->"Italic"], ". Otherwise, we use ", StyleBox["VerifyFunctionNot1.", FontWeight->"Bold"] }], "Text", CellChangeTimes->{{3.434043763171875*^9, 3.43404377734375*^9}, { 3.43410546453125*^9, 3.4341054718125*^9}, {3.43410558534375*^9, 3.4341055898125*^9}, {3.434219674453125*^9, 3.434219677046875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunction1", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_", ",", "1"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"len", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "1"}], "]"}], ",", RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", RowBox[{"MinusOne", "[", "S", "]"}], ",", "var", ",", RowBox[{"var", "-", "1"}], ",", "len"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunction1", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_", ",", "n_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "n"}], "]"}], ",", RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", RowBox[{"MinusOne", "[", "S", "]"}], ",", "var", ",", RowBox[{"n", "-", "1"}]}], "]"}]}], "}"}]}]}], "Input", CellChangeTimes->{{3.43404287584375*^9, 3.434042905421875*^9}, { 3.434042941078125*^9, 3.43404295171875*^9}, {3.434042988984375*^9, 3.434042989109375*^9}, {3.4340437454375*^9, 3.434043759796875*^9}, { 3.434043876375*^9, 3.434043887921875*^9}, {3.434044204265625*^9, 3.43404421084375*^9}, {3.434044652421875*^9, 3.43404475746875*^9}, { 3.434044796890625*^9, 3.434044860015625*^9}, {3.434045174125*^9, 3.434045176984375*^9}, {3.43410544425*^9, 3.434105447953125*^9}, { 3.434119793046875*^9, 3.434119794765625*^9}, {3.4342197345*^9, 3.434219778609375*^9}, {3.434220146984375*^9, 3.434220147328125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunctionNot1", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_", ",", "1"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"len", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "1"}], "]"}], ",", RowBox[{"SmartMax", "[", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", RowBox[{"MinusOne", "[", "S", "]"}], ",", "var", ",", RowBox[{"var", "-", "1"}], ",", "len"}], "]"}], ",", RowBox[{"1", "+", RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", RowBox[{ RowBox[{"MinusOne", "[", "S", "]"}], "\[Union]", "\[CapitalDelta]"}], ",", "var", ",", RowBox[{"var", "-", "1"}], ",", "len"}], "]"}]}], ",", "var"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunctionNot1", "[", RowBox[{"\[CapitalDelta]_", ",", "S_", ",", "var_", ",", "N_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}], ",", RowBox[{"Expand", "[", RowBox[{"SmartMax", "[", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", RowBox[{"MinusOne", "[", "S", "]"}], ",", "var", ",", RowBox[{"N", "-", "1"}]}], "]"}], ",", RowBox[{"1", "+", RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", RowBox[{ RowBox[{"MinusOne", "[", "S", "]"}], "\[Union]", "\[CapitalDelta]"}], ",", "var", ",", RowBox[{"N", "-", "1"}]}], "]"}]}], ",", "var"}], "]"}], "]"}]}], "}"}]}]}], "Input", CellChangeTimes->{{3.434105595640625*^9, 3.43410576996875*^9}, 3.434105863203125*^9, {3.4341059328125*^9, 3.4341059414375*^9}, { 3.4341060275*^9, 3.434106041109375*^9}, {3.434106604921875*^9, 3.43410663421875*^9}, {3.434118539234375*^9, 3.434118543234375*^9}, { 3.434119818859375*^9, 3.43411985946875*^9}, {3.43411999840625*^9, 3.434119998546875*^9}, {3.43412008525*^9, 3.434120085296875*^9}, { 3.4341201318125*^9, 3.434120135625*^9}, {3.434219786640625*^9, 3.434219821796875*^9}, {3.4342201578125*^9, 3.434220162796875*^9}, { 3.4344653306875*^9, 3.43446534128125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"VerifyFunction", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "N_Integer"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"S", ",", "1"}], "]"}], ",", RowBox[{"VerifyFunction1", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}], ",", RowBox[{"VerifyFunctionNot1", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.434105772828125*^9, 3.4341058148125*^9}, { 3.434105867421875*^9, 3.4341058711875*^9}, {3.434117199171875*^9, 3.43411720934375*^9}, {3.434117592125*^9, 3.43411763784375*^9}, { 3.4341181985625*^9, 3.434118267125*^9}, {3.434118371671875*^9, 3.43411844053125*^9}, {3.434118474609375*^9, 3.4341185146875*^9}, { 3.434118544734375*^9, 3.434118593765625*^9}, {3.434118636484375*^9, 3.434118683765625*^9}, {3.43411873771875*^9, 3.43411887628125*^9}, { 3.4341189211875*^9, 3.43411893325*^9}, {3.434118990671875*^9, 3.4341189924375*^9}, {3.4341190275*^9, 3.4341190315*^9}, { 3.434119104171875*^9, 3.434119200109375*^9}, {3.43411926675*^9, 3.434119267046875*^9}, {3.434119299203125*^9, 3.43411930165625*^9}, { 3.4341193948125*^9, 3.4341194238125*^9}, {3.434119493859375*^9, 3.434119521140625*^9}, {3.434119553953125*^9, 3.434119711359375*^9}, { 3.434119765640625*^9, 3.434119776078125*^9}, {3.434119876796875*^9, 3.434119878953125*^9}, {3.43412017246875*^9, 3.434120174*^9}, { 3.4341204961875*^9, 3.43412050446875*^9}, {3.4341206003125*^9, 3.4341206228125*^9}, {3.434120681859375*^9, 3.434120701453125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunction1Verbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "1"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"result", "=", RowBox[{"VerifyFunction", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "1"}], "]"}]}], ",", RowBox[{"p", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}]}], "}"}], ",", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", " ", "1"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< we have that \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", "1", "]"}], "]"}], "==", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", "1"}], ",", "S"}], "]"}], "\[Equal]", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", RowBox[{"(", RowBox[{"var", " ", "-", " ", "1"}], ")"}]}], "+", "p"}], ",", RowBox[{"MinusOne", "[", "S", "]"}]}], "]"}]}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<, which is equal to \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"result", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<. \>\"", "<>", RowBox[{"If", "[", RowBox[{ RowBox[{"CheckEquality", "[", RowBox[{ RowBox[{"First", "[", "result", "]"}], ",", RowBox[{"Last", "[", "result", "]"}], ",", "var"}], "]"}], ",", "\"\\"", ",", "\"\\""}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunction1Verbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "N_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"result", "=", RowBox[{"VerifyFunction", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}]}], ",", RowBox[{"p", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}]}], "}"}], ",", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", " ", "N"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< we have that \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", "1", "]"}], "]"}], "==", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", "N"}], ",", "S"}], "]"}], "\[Equal]", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", " ", "N", "-", "1"}], ",", RowBox[{"MinusOne", "[", "S", "]"}]}], "]"}]}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<, which is equal to \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"result", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<. \>\"", "<>", RowBox[{"If", "[", RowBox[{ RowBox[{"CheckEquality", "[", RowBox[{ RowBox[{"First", "[", "result", "]"}], ",", RowBox[{"Last", "[", "result", "]"}], ",", "var"}], "]"}], ",", "\"\\"", ",", "\"\\""}], "]"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.434120702328125*^9, 3.434120702890625*^9}, { 3.43412109140625*^9, 3.43412115025*^9}, {3.434220999015625*^9, 3.434221005546875*^9}, {3.434221064953125*^9, 3.43422106553125*^9}, 3.434296768671875*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunctionNot1Verbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "1"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"result", "=", RowBox[{"VerifyFunction", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "1"}], "]"}]}], ",", RowBox[{"p", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}]}], "}"}], ",", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", " ", "1"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< we have that \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", "1", "]"}], "]"}], "==", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", "1"}], ",", "S"}], "]"}], "\[Equal]", RowBox[{"Max", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", RowBox[{"(", RowBox[{"var", " ", "-", " ", "1"}], ")"}]}], "+", "p"}], ",", RowBox[{"MinusOne", "[", "S", "]"}]}], "]"}], ",", RowBox[{"1", "+", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", RowBox[{"(", RowBox[{"var", "-", "1"}], ")"}]}], "+", "p"}], ",", RowBox[{"\[CapitalDelta]", "\[Union]", RowBox[{"MinusOne", "[", "S", "]"}]}]}], "]"}]}]}], "]"}]}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<, which is equal to \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"result", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<. \>\"", "<>", RowBox[{"If", "[", RowBox[{ RowBox[{"CheckEquality", "[", RowBox[{ RowBox[{"First", "[", "result", "]"}], ",", RowBox[{"Last", "[", "result", "]"}], ",", "var"}], "]"}], ",", "\"\\"", ",", "\"\\""}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunctionNot1Verbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "N_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"result", "=", RowBox[{"VerifyFunction", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}]}], ",", RowBox[{"p", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}]}], "}"}], ",", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", " ", "1"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< we have that \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", "1", "]"}], "]"}], "==", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], " ", "+", "N"}], ",", "S"}], "]"}], "\[Equal]", RowBox[{"Max", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], "+", "N", "-", "1"}], ",", RowBox[{"MinusOne", "[", "S", "]"}]}], "]"}], ",", RowBox[{"1", "+", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{ RowBox[{"p", " ", "var"}], "+", "N", "-", "1"}], ",", RowBox[{"\[CapitalDelta]", "\[Union]", RowBox[{"MinusOne", "[", "S", "]"}]}]}], "]"}]}]}], "]"}]}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<, which is equal to \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"result", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<. \>\"", "<>", RowBox[{"If", "[", RowBox[{ RowBox[{"CheckEquality", "[", RowBox[{ RowBox[{"First", "[", "result", "]"}], ",", RowBox[{"Last", "[", "result", "]"}], ",", "var"}], "]"}], ",", "\"\\"", ",", "\"\\""}], "]"}]}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.43412070690625*^9, 3.434120716015625*^9}, { 3.434120769640625*^9, 3.43412084490625*^9}, {3.434120920734375*^9, 3.4341209679375*^9}, {3.434121114140625*^9, 3.434121117734375*^9}, { 3.434121152703125*^9, 3.43412115565625*^9}, {3.43412119496875*^9, 3.434121208546875*^9}, {3.434221012015625*^9, 3.434221021703125*^9}, { 3.434288867328125*^9, 3.434288901171875*^9}, {3.434288944640625*^9, 3.434288952203125*^9}, 3.434296723296875*^9}], Cell[BoxData[ RowBox[{ RowBox[{"VerifyFunctionVerbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "N_Integer"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"S", ",", "1"}], "]"}], ",", RowBox[{"VerifyFunction1Verbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}], ",", RowBox[{"VerifyFunctionNot1Verbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "N"}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.434120852734375*^9, 3.43412089275*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunctionAll", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"l", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"VerifyFunction", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "i"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "l"}], "}"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunctionAll", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"VerifyFunctionAll", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.4341206833125*^9, 3.434120686625*^9}, { 3.43422025290625*^9, 3.4342202624375*^9}, {3.43422029371875*^9, 3.434220310875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunctionAllVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"len", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"StringJoin", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"\"\<\\n\\n\>\"", "<>", RowBox[{"VerifyFunctionVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "i"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "len"}], "}"}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunctionAllVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"VerifyFunctionAllVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.4342208315625*^9, 3.434220934625*^9}, { 3.4342211845625*^9, 3.43422119290625*^9}, {3.434222489484375*^9, 3.434222503328125*^9}, {3.434222539296875*^9, 3.434222546296875*^9}, { 3.434222832203125*^9, 3.434222837984375*^9}}], Cell[TextData[{ "To speed things up, we can already dictate to ", StyleBox["VerifyFunctionAllVerbose", FontWeight->"Bold"], " what the common length is." }], "Text", CellChangeTimes->{{3.434222839671875*^9, 3.434222869171875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyFunctionAllVerboseCL", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "CL_Integer"}], "]"}], ":=", RowBox[{"StringJoin", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"\"\<\\n\\n\>\"", "<>", RowBox[{"VerifyFunctionVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "i"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "CL"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyFunctionAllVerboseCL", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "CL_Integer"}], "]"}], ":=", RowBox[{"VerifyFunctionAllVerboseCL", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q", ",", "CL"}], "]"}]}]}], "Input", CellChangeTimes->{{3.434222872953125*^9, 3.43422292996875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"VerifyAllFunctionsVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"possS", "=", RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], ",", RowBox[{"CL", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}]}], "}"}], ",", RowBox[{"StringJoin", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"\[FilledSmallCircle]", ",", "s"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<:\>\"", "<>", RowBox[{"VerifyFunctionAllVerboseCL", "[", RowBox[{"\[CapitalDelta]", ",", "s", ",", "var", ",", "CL"}], "]"}], "<>", "\"\<\\n\\n\>\""}], ",", RowBox[{"{", RowBox[{"s", ",", "possS"}], "}"}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VerifyAllFunctionsVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"VerifyAllFunctionsVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43422254734375*^9, 3.4342226506875*^9}, { 3.43422272696875*^9, 3.434222823*^9}, {3.43422293846875*^9, 3.434222972703125*^9}, {3.43422301325*^9, 3.4342230149375*^9}, { 3.434223069171875*^9, 3.434223077125*^9}, {3.434223175234375*^9, 3.434223244953125*^9}, {3.43437169640625*^9, 3.4343717028125*^9}, { 3.434371765546875*^9, 3.43437177796875*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"MaxAvoidSizeSequenceVerbose", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{"n", ",", "TraditionalForm"}], "]"}], "<>", "\"\< terms of the sequence \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"\[FilledSmallCircle]", ",", "S"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< is:\\n\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}], "]"}], "<>", "\"\<\\n\\n\>\""}]}]], "Input", CellChangeTimes->{{3.4343697859375*^9, 3.43436985925*^9}, { 3.434369946609375*^9, 3.43437000190625*^9}, {3.43437005684375*^9, 3.43437006303125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"MaxAvoidSizeSequences", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "#"}], "]"}], "&"}], "/@", "S"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSizeSequencesFromStart", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"UsedS", "=", RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"MaxAvoidSizeSequences", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "UsedS"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.43437007703125*^9, 3.434370129109375*^9}, { 3.43437021265625*^9, 3.434370226421875*^9}, {3.434370287046875*^9, 3.434370315*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"MaxAvoidSizeSequencesVerbose", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"StringJoin", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"MaxAvoidSizeSequenceVerbose", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "s"}], "]"}], ",", RowBox[{"{", RowBox[{"s", ",", "S"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MaxAvoidSizeSequencesFromStartVerbose", "[", RowBox[{"n_Integer", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"UsedS", "=", RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"MaxAvoidSizeSequencesVerbose", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "UsedS"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.434370316765625*^9, 3.43437032640625*^9}, { 3.434370425078125*^9, 3.4343704958125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"offset", "=", RowBox[{"GetMaxOffset", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], ",", RowBox[{"CL", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}]}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{"Floor", "[", RowBox[{"offset", "/", "CL"}], "]"}], "*", "CL"}], "+", "CL"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.434291565203125*^9, 3.434291620015625*^9}, { 3.43429170565625*^9, 3.4342917060625*^9}, 3.43429174471875*^9, { 3.434291784046875*^9, 3.43429178775*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"CheckBaseCase", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "num_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"quot", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"num", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"Floor", "[", RowBox[{"num", "/", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], "-", "1"}], ",", RowBox[{"Floor", "[", RowBox[{"num", "/", RowBox[{"Length", "[", "funs", "]"}]}], "]"}]}], "]"}]}], ",", RowBox[{"rem", "=", RowBox[{"RealMod", "[", RowBox[{"num", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"MaxAvoidSize", "[", RowBox[{"num", ",", "\[CapitalDelta]", ",", "S"}], "]"}], ",", RowBox[{ RowBox[{"funs", "[", RowBox[{"[", RowBox[{"rem", ",", "3"}], "]"}], "]"}], "/.", RowBox[{"var", "\[Rule]", "quot"}]}]}], "}"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCase", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "num_Integer"}], "]"}], ":=", RowBox[{"CheckBaseCase", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q", ",", "num"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCases", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "num_Integer"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"CheckBaseCase", "[", RowBox[{"\[CapitalDelta]", ",", "#", ",", "var", ",", "num"}], "]"}], "&"}], "/@", "S"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCases", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "num_Integer"}], "]"}], ":=", RowBox[{"CheckBaseCases", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q", ",", "num"}], "]"}]}]}], "Input", CellChangeTimes->{{3.434287737046875*^9, 3.43428773759375*^9}, { 3.434287881515625*^9, 3.43428795075*^9}, {3.434287992296875*^9, 3.434287995296875*^9}, {3.434288025546875*^9, 3.43428806396875*^9}, { 3.43428815328125*^9, 3.43428819821875*^9}, {3.43428825171875*^9, 3.434288291078125*^9}, {3.434289766875*^9, 3.434289799390625*^9}, { 3.434290054921875*^9, 3.434290092453125*^9}, {3.434290913640625*^9, 3.434290949359375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"CheckBaseCasesFromStarting", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "num_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"UsedS", "=", RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"CheckBaseCases", "[", RowBox[{"\[CapitalDelta]", ",", "UsedS", ",", "var", ",", "num"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCasesFromStarting", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"CL", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"num", "=", RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"CheckBaseCasesFromStarting", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "num"}], "]"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCasesFromStarting", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"CheckBaseCasesFromStarting", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43428980159375*^9, 3.43429004884375*^9}, { 3.43429009896875*^9, 3.434290129953125*^9}, 3.434291941046875*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"GetCommonStartingPoint", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"CL", "=", RowBox[{"CommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"num", "=", RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", "CL"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GetCommonStartingPoint", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"GetCommonStartingPoint", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43429013359375*^9, 3.434290174296875*^9}, 3.434291928421875*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"CheckBaseCaseVerbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "num_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"funs", "=", RowBox[{"WriteFunctionFromSetsCommonLength", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Q", "=", RowBox[{"Length", "[", "funs", "]"}]}], ",", RowBox[{"quot", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"num", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"Floor", "[", RowBox[{"num", "/", RowBox[{"Length", "[", "funs", "]"}]}], "]"}], "-", "1"}], ",", RowBox[{"Floor", "[", RowBox[{"num", "/", RowBox[{"Length", "[", "funs", "]"}]}], "]"}]}], "]"}]}], ",", RowBox[{"rem", "=", RowBox[{"RealMod", "[", RowBox[{"num", ",", RowBox[{"Length", "[", "funs", "]"}]}], "]"}]}], ",", RowBox[{"L", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"num", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], ",", RowBox[{"result", "=", RowBox[{"CheckBaseCase", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "num"}], "]"}]}]}], "}"}], ",", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"num", ",", "S"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< is \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"Last", "[", "L", "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<, while the function states, being that \>\"", "<>", RowBox[{"ToString", "[", RowBox[{"num", ",", "TraditionalForm"}], "]"}], "<>", "\"\< is of the form \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"HoldForm", "[", RowBox[{ RowBox[{"Q", RowBox[{"(", "quot", ")"}]}], "+", "rem"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<, that our value is \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"GetAppropriateExpressionCL", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "num"}], "]"}], "/.", RowBox[{"var", "\[Rule]", "quot"}]}], "]"}], "<>", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"First", "[", "result", "]"}], "\[Equal]", RowBox[{"Last", "[", "result", "]"}]}], ",", "\"\<. Since they are both equal, we're done!\\n\\n\>\"", ",", "\"\<. THEY ARE NOT EQUAL. SOMETHING IS WRONG.\\n\\n\>\""}], "]"}]}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCaseVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "num_Integer"}], "]"}], ":=", RowBox[{"CheckBaseCaseVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q", ",", "num"}], "]"}]}]}], "Input", CellChangeTimes->{{3.43429041890625*^9, 3.434290594421875*^9}, { 3.434290626546875*^9, 3.43429069653125*^9}, {3.4342907389375*^9, 3.43429080296875*^9}, {3.43429095971875*^9, 3.4342909908125*^9}, { 3.434291021078125*^9, 3.434291071046875*^9}, {3.434291292265625*^9, 3.434291309*^9}, {3.434291824015625*^9, 3.434291845265625*^9}, { 3.434291875875*^9, 3.434291884234375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "num_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"UsedS", "=", RowBox[{"GetUsedS", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"StringJoin", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"CheckBaseCaseVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "s", ",", "var", ",", "num"}], "]"}], ",", RowBox[{"{", RowBox[{"s", ",", "UsedS"}], "}"}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "num_Integer"}], "]"}], ":=", RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q", ",", "num"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"num", "=", RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "var", ",", "num"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"num", "=", RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q", ",", "num"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.43429130975*^9, 3.434291327390625*^9}, { 3.43429138453125*^9, 3.4342915274375*^9}, {3.43429162940625*^9, 3.434291637828125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"WriteProof", "[", RowBox[{"\[CapitalDelta]1_", ",", "S1_"}], "]"}], ":=", RowBox[{"\"\\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]1"], "[", RowBox[{"n", ",", "S1"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< is given by the following function past a certain point:\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<.\\nWe can see that this is happening by looking at the first few \ terms of this sequence:\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"25", ",", "\[CapitalDelta]1", ",", "S1"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<\\nWe will prove that the function holds by taking advantage of the \ following recursive formula, valid for any set \>\"", "<>", RowBox[{"ToString", "[", RowBox[{"\[CapitalDelta]", ",", "TraditionalForm"}], "]"}], "<>", "\"\< and \>\"", "<>", RowBox[{"ToString", "[", "S", "]"}], "<>", "\"\<:\\n\\nTheorem: If \>\"", "<>", RowBox[{"ToString", "[", RowBox[{"HoldForm", "[", RowBox[{"1", "\[Element]", "S"}], "]"}], "]"}], "<>", "\"\< then\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"HoldForm", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"n", ",", "S"}], "]"}], "==", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", RowBox[{"S", "-", "1"}]}], "]"}]}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<\\nWhere S-1 is defined as \>\"", "<>", RowBox[{"ToString", "[", RowBox[{"HoldForm", "[", RowBox[{"{", RowBox[{ RowBox[{"s", "-", "1"}], "|", RowBox[{"s", "\[Element]", "S"}]}], "}"}], "]"}], "]"}], "<>", "\"\< (we can remove the element 0 if it appears in S-1).\\n If \>\"", "<>", RowBox[{"ToString", "[", RowBox[{"HoldForm", "[", RowBox[{"1", "\[NotElement]", "S"}], "]"}], "]"}], "<>", "\"\< then \\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"HoldForm", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{"n", ",", "S"}], "]"}], "\[Equal]", RowBox[{"Max", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", RowBox[{"S", "-", "1"}]}], "]"}], ",", RowBox[{"1", "+", RowBox[{ SubscriptBox["a", "\[CapitalDelta]"], "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", RowBox[{"\[CapitalDelta]", "\[Union]", RowBox[{"(", RowBox[{"(", RowBox[{"S", "-", "1"}], ")"}], ")"}]}]}], "]"}]}]}], "]"}]}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<\\n\\nWith repeated applications of the above recursion, we see that \ we have the following closed collection of expressions:\\n\>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"WriteEquations", "[", RowBox[{"n", ",", "\[CapitalDelta]1", ",", "S1"}], "]"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<\\nand we will actually now prove that all of the functions listed \ (which includes \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{ SubscriptBox["a", "\[CapitalDelta]1"], "[", RowBox[{"n", ",", "S1"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<) are as follows:\>\"", "<>", RowBox[{"WriteAllFunctionsEqualLengthString", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}], "<>", "\"\<\\n\\nWe first check the base case, which will be at \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\<. We now list the first \>\"", "<>", RowBox[{"ToString", "[", RowBox[{ RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}], ",", "TraditionalForm"}], "]"}], "<>", "\"\< elements of each of the necessary lists and then compare them to the \ functions conjectured above:\\n\\n\>\"", "<>", RowBox[{"MaxAvoidSizeSequencesFromStartVerbose", "[", RowBox[{ RowBox[{"GetBaseCaseStart", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}], ",", "\[CapitalDelta]1", ",", "S1"}], "]"}], "<>", "\"\\"", "<>", RowBox[{"CheckBaseCasesFromStartingVerbose", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}], "<>", "\"\\"", "<>", RowBox[{"VerifyAllFunctionsVerbose", "[", RowBox[{"\[CapitalDelta]1", ",", "S1"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.434106906625*^9, 3.434106907828125*^9}, { 3.434106951171875*^9, 3.434106959515625*^9}, {3.43410703409375*^9, 3.434107126703125*^9}, {3.434107158484375*^9, 3.434107308578125*^9}, { 3.4341076883125*^9, 3.43410775484375*^9}, {3.434109220734375*^9, 3.43410924153125*^9}, {3.43410940446875*^9, 3.434109471109375*^9}, { 3.434109503984375*^9, 3.43410953559375*^9}, {3.4341095945625*^9, 3.43410985421875*^9}, {3.4341101769375*^9, 3.43411030025*^9}, { 3.43411033471875*^9, 3.43411033778125*^9}, {3.434116725734375*^9, 3.434116853734375*^9}, {3.434222350296875*^9, 3.43422237975*^9}, { 3.43436949265625*^9, 3.434369532078125*^9}, {3.434370848671875*^9, 3.43437092840625*^9}, {3.434371502453125*^9, 3.43437168690625*^9}, { 3.43437178478125*^9, 3.43437179815625*^9}, {3.434371921265625*^9, 3.434371922796875*^9}, {3.434465525390625*^9, 3.434465559390625*^9}, { 3.434465591546875*^9, 3.43446570753125*^9}, {3.4344657420625*^9, 3.434465819140625*^9}}], Cell[TextData[{ "Note to self: look into ", StyleBox["{3,5,8,11}", FontSlant->"Italic"], " avoiding ", StyleBox["{3}", FontSlant->"Italic"], " . . ." }], "Text", CellChangeTimes->{{3.43439506225*^9, 3.43439507765625*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"25", ",", RowBox[{"{", RowBox[{"2", ",", "3", ",", "9"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.43531612396875*^9, 3.43531616025*^9}, {3.435323114*^9, 3.435323129359375*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "2", ",", "2", ",", "2", ",", "2", ",", "3", ",", "4", ",", "4", ",", "4", ",", "4", ",", "4", ",", "5", ",", "6", ",", "6", ",", "6", ",", "6", ",", "7", ",", "8", ",", "8", ",", "8", ",", "8", ",", "8", ",", "9", ",", "10", ",", "10"}], "}"}]], "Output", CellChangeTimes->{ 3.435316127734375*^9, 3.435316160546875*^9, {3.43532311628125*^9, 3.43532312971875*^9}, 3.43532713925*^9, 3.442060252171875*^9, 3.44216028390625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"25", ",", RowBox[{"{", RowBox[{"1", ",", "4", ",", "9"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.435316163671875*^9, 3.435316172296875*^9}, { 3.4353237083125*^9, 3.43532370884375*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "1", ",", "2", ",", "2", ",", "2", ",", "3", ",", "3", ",", "4", ",", "4", ",", "4", ",", "5", ",", "5", ",", "6", ",", "6", ",", "6", ",", "7", ",", "7", ",", "8", ",", "8", ",", "8", ",", "9", ",", "9", ",", "10", ",", "10", ",", "10"}], "}"}]], "Output", CellChangeTimes->{3.435316172546875*^9, 3.435323709109375*^9, 3.435327139296875*^9, 3.442060252265625*^9, 3.44216028396875*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "WriteFunctionFromSets"}]], "Input", CellChangeTimes->{{3.43532294809375*^9, 3.43532295515625*^9}}], Cell[CellGroupData[{ Cell["Global`WriteFunctionFromSets", "Print", "PrintUsage", CellChangeTimes->{3.442160284328125*^9}, CellTags->"Info3442142284-1171250"], Cell[BoxData[ InterpretationBox[GridBox[{ {GridBox[{ { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "n", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "repeats"}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"seq", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"OP", "=", RowBox[{"OffsetAndPeriodGeneral", "[", "seq", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{"-", "1"}]}], "||", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{"-", "1"}]}]}], ",", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}], ",", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], ",", RowBox[{"seq", "\[LeftDoubleBracket]", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"seq", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], ",", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", RowBox[{ "OP", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}]}], "}"}]}], "]"}], "-", RowBox[{"seq", "\[LeftDoubleBracket]", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[RightDoubleBracket]"}]}], ",", "var"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "q", ",", "repeats"}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List", ",", "var_"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"50", ",", "\[CapitalDelta]", ",", "S", ",", "var"}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n_", ",", "\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]_List", ",", "S_List"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{"\[CapitalDelta]", ",", "S", ",", "q"}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "n_", ",", "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"seq", "=", RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"n", ",", "\[CapitalDelta]", ",", "S"}], "]"}]}], "}"}], ",", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"OP", "=", RowBox[{"OffsetAndPeriodGeneral", "[", "seq", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{"-", "1"}]}], "||", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{"-", "1"}]}]}], ",", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"n", "+", "50"}], ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "repeats"}], "]"}], ",", RowBox[{"WriteFunction", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], ",", RowBox[{"seq", "\[LeftDoubleBracket]", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{ RowBox[{"Take", "[", RowBox[{"seq", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], ",", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", RowBox[{ "OP", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}]}], "}"}]}], "]"}], "-", RowBox[{"seq", "\[LeftDoubleBracket]", RowBox[{ RowBox[{ "OP", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", "1"}], "\[RightDoubleBracket]"}]}], ",", "var", ",", "repeats"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}]}, {" "}, { RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "\[CapitalDelta]_List", ",", "S_List", ",", "var_", ",", "repeats_Integer"}], "]"}], ":=", RowBox[{"WriteFunctionFromSets", "[", RowBox[{ "50", ",", "\[CapitalDelta]", ",", "S", ",", "var", ",", "repeats"}], "]"}]}]} }, BaselinePosition->{Baseline, {1, 1}}, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{"Columns" -> {{ Scaled[0.999]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}]} }, BaselinePosition->{Baseline, {1, 1}}, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}], Definition["WriteFunctionFromSets"], Editable->False]], "Print", CellChangeTimes->{3.442160284328125*^9}, CellTags->"Info3442142284-1171250"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "5", ",", "8"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.435322929171875*^9, 3.4353229696875*^9}, { 3.435323072828125*^9, 3.435323073265625*^9}, {3.435323137375*^9, 3.435323137625*^9}, {3.4353232096875*^9, 3.435323214265625*^9}, { 3.435323662578125*^9, 3.435323704640625*^9}, {3.435323774109375*^9, 3.43532385559375*^9}, {3.43532388796875*^9, 3.43532388809375*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"A", "[", RowBox[{"1", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"2", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"3", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"4", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"5", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"6", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"7", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"8", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"9", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"10", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.43532294515625*^9, 3.435322970015625*^9}, 3.4353230736875*^9, 3.435323137953125*^9, {3.4353232103125*^9, 3.435323214828125*^9}, {3.43532366471875*^9, 3.435323704859375*^9}, { 3.4353237755625*^9, 3.435323856234375*^9}, 3.435323888484375*^9, 3.435327139671875*^9, 3.442060252859375*^9, 3.4421602845625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"WriteProof", "[", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.434107096859375*^9, 3.434107102015625*^9}, { 3.434372279125*^9, 3.4343722794375*^9}, {3.43438064184375*^9, 3.434380642125*^9}, {3.4343808431875*^9, 3.43438085471875*^9}, { 3.4344643663125*^9, 3.434464366640625*^9}, {3.434464664796875*^9, 3.434464664953125*^9}, {3.434465713453125*^9, 3.434465713609375*^9}, { 3.434465888609375*^9, 3.434465888625*^9}, {3.43531608859375*^9, 3.4353160888125*^9}, {3.44206027615625*^9, 3.4420602775625*^9}, { 3.442077893828125*^9, 3.442077895265625*^9}, 3.442160624703125*^9}], Cell[BoxData["\<\"We want to show that the sequence \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({}\\)\\)\\)\\))\\)\\) \ is given by the following function past a certain \ point:\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\[NoBreak] \ \\*GridBox[{{\\(A(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\))\\), \ \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, \ {\\(A(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\ \\(\\(3\\\\ q\\)\\) + 2\\)}, {\\(A(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\))\\), \ \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + 3\\)}, \ {\\(A(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\ \\(\\(3\\\\ q\\)\\) + 3\\)}, {\\(A(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\))\\), \ \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + 3\\)}, \ {\\(A(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\ \\(\\(3\\\\ q\\)\\) + 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, \ ColumnAlignments -> Left] \[NoBreak])\\), Function[BoxForm`e$, \ MatrixForm[BoxForm`e$]]]\\).\\nWe can see that this is happening by looking \ at the first few terms of this sequence:\\n\\!\\(TraditionalForm\\`\\({1, 2, \ 3, 3, 3, 3, 4, 5, 6, 6, 6, 6, 7, 8, 9, 9, 9, 9, 10, 11, 12, 12, 12, 12, \ 13}\\)\\)\\nWe will prove that the function holds by taking advantage of the \ following recursive formula, valid for any set \\!\\(TraditionalForm\\`\ \[CapitalDelta]\\) and Snake[{1, 2, 4, 5}, 8]:\\n\\nTheorem: If 1 \[Element] \ S then\\n\\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(a\\_\[CapitalDelta](\\(\\(\ n, S\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\[CapitalDelta](\\(\\(\\(\\(n - 1\\)\ \\), \\(\\(S - 1\\)\\)\\)\\))\\)\\)\\), HoldForm]\\)\\nWhere S-1 is defined \ as {s - 1 | s \[Element] S} (we can remove the element 0 if it appears in \ S-1).\\n If 1 \[NotElement] S then \ \\n\\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(a\\_\[CapitalDelta](\\(\\(n, \ S\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\[CapitalDelta](\\(\\(\\(\\(n - 1\\)\\), \\(\\(S - \ 1\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\[CapitalDelta](\\(\\(\\(\\(n - \ 1\\)\\), \\(\\(\[CapitalDelta] \[Union] \\(\\(S - 1\\)\\)\\)\\)\\)\\))\\)\\) \ + 1\\)\\)\\)\\))\\)\\)\\), HoldForm]\\)\\n\\nWith repeated applications of \ the above recursion, we see that we have the following closed collection of \ expressions:\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\[NoBreak] \ \\*TagBox[GridBox[{{\\(\\(\\(a\\_\\({3}\\)(\\(\\(n, \ \\(\\({}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\ \\(\\(\\(\\(n - 1\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - 1\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)}, {\\(\\(\\(a\\_\\({3}\ \\)(\\(\\(n, \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - 1\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\)\\)}, \ {\\(\\(\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - 1\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - \ 1\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)}, \ {\\(\\(\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - 1\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - \ 1\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)}, \ {\\(\\(\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({1, 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - 1\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\)\\)}, {\\(\\(\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - \ 1\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\)\\)}, {\\(\\(\\(a\\_\\({3}\\)(\\(\\(n, \ \\(\\({2, 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\ \\)(\\(\\(\\(\\(n - 1\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(n - 1\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)}, {\\(\\(\\(a\\_\\({3}\\)(\\(\ \\(n, \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\ \\(\\(\\(n - 1\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\)\\)}}, RowSpacings -> 1, \ ColumnAlignments -> Left], Column] \[NoBreak])\\), Function[BoxForm`e$, \ MatrixForm[BoxForm`e$]]]\\)\\nand we will actually now prove that all of the \ functions listed (which includes \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\ \\(n, \\(\\({}\\)\\)\\)\\))\\)\\)) are as follows:\\n\\nFor \ \\!\\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({}\\)\\)\\)\ \\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\[NoBreak] \ \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \\!\ \\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \ \\(\\({1}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\ \\((\[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) \ + 1\\)\\), \\(\\({1}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ \ q\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1}\ \\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, \ {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \\!\ \\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \ \\(\\({2}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\ \\((\[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) \ + 1\\)\\), \\(\\({2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\ \\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 2\\)\\), \\(\\({2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ \ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \\!\ \\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \ \\(\\({3}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\ \\((\[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) \ + 1\\)\\), \\(\\({3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\ \\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 2\\)\\), \\(\\({3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ \ q\\)\\) + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) \ + 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \\!\ \\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({1, \ 2}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\ \[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ \ q\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ q\\)}, {\\(a\\_\\({3}\ \\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\), \ \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\ \\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\), \\\"\ \\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + 2\\)}, \ {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \\!\ \\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({1, \ 3}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\ \[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ \ q\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \\!\ \\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({2, \ 3}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\ \[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \ \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ q\\)\\) + 2\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \ \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ q\\)\\) + 3\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \ \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ q\\)\\) + 4\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \ \\(\\(\\(3\\\\ q\\)\\) + 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ q\\)\\) + 5\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \ \\(\\(\\(3\\\\ q\\)\\) + 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ q\\)\\) + 6\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \ \\(\\(\\(3\\\\ q\\)\\) + 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, \ ColumnAlignments -> Left] \[NoBreak])\\), Function[BoxForm`e$, \ MatrixForm[BoxForm`e$]]]\\)\\n\\nFor \ \\!\\(TraditionalForm\\`\\*TagBox[\\(a\\_\\({3}\\)(\\(\\(n, \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\), HoldForm]\\):\\n\\!\\(TraditionalForm\\`\\*TagBox[\\((\ \[NoBreak] \\*GridBox[{{\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({1, 2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ \ q\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, \ 2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ q\\)}, \ {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(3\\\\ q\\)}, {\\(a\\_\\({3}\ \\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 1\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, \ 2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 2\\)}, {\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({1, \ 2, 3}\\)\\)\\)\\))\\), \\\"\\\\\\\"=\\\\\\\"\\\", \\(\\(\\(3\\\\ q\\)\\) + \ 3\\)}}, RowSpacings -> 1, ColumnSpacings -> 1, ColumnAlignments -> Left] \ \[NoBreak])\\), Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\\)\\n\\nWe \ first check the base case, which will be at \\!\\(TraditionalForm\\`6\\). We \ now list the first \\!\\(TraditionalForm\\`6\\) elements of each of the \ necessary lists and then compare them to the functions conjectured \ above:\\n\\nAs can be verified by the recursion, the first \ \\!\\(TraditionalForm\\`6\\) terms of the sequence \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \\(\\({}\ \\)\\)\\)\\))\\)\\) is:\\n\\n{1, 2, 3, 3, 3, 3}\\n\\nAs can be verified by \ the recursion, the first \\!\\(TraditionalForm\\`6\\) terms of the sequence \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1}\\)\\)\\)\\))\\)\\) is:\\n\\n{0, 1, 2, 3, 3, 3}\\n\\nAs can be \ verified by the recursion, the first \\!\\(TraditionalForm\\`6\\) terms of \ the sequence \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\ \[FilledSmallCircle], \\(\\({2}\\)\\)\\)\\))\\)\\) is:\\n\\n{1, 1, 2, 2, 3, \ 3}\\n\\nAs can be verified by the recursion, the first \ \\!\\(TraditionalForm\\`6\\) terms of the sequence \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({3}\\)\\)\\)\\))\\)\\) is:\\n\\n{1, 2, 2, 2, 2, 3}\\n\\nAs can be \ verified by the recursion, the first \\!\\(TraditionalForm\\`6\\) terms of \ the sequence \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\ \[FilledSmallCircle], \\(\\({1, 2}\\)\\)\\)\\))\\)\\) is:\\n\\n{0, 0, 1, 2, \ 3, 3}\\n\\nAs can be verified by the recursion, the first \ \\!\\(TraditionalForm\\`6\\) terms of the sequence \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1, 3}\\)\\)\\)\\))\\)\\) is:\\n\\n{0, 1, 1, 2, 2, 3}\\n\\nAs can be \ verified by the recursion, the first \\!\\(TraditionalForm\\`6\\) terms of \ the sequence \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\ \[FilledSmallCircle], \\(\\({2, 3}\\)\\)\\)\\))\\)\\) is:\\n\\n{1, 1, 1, 1, \ 2, 3}\\n\\nAs can be verified by the recursion, the first \ \\!\\(TraditionalForm\\`6\\) terms of the sequence \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) is:\\n\\n{0, 0, 0, 1, 2, 3}\\n\\nWe now \ check the base case for all possibilities:\\n\\nFrom the recursion we can \ calculate that \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \ \\(\\({}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the \ function states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \ \\(\\({1}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the \ function states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \ \\(\\({2}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the \ function states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \ \\(\\({3}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the \ function states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the function \ states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the function \ states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the function \ states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nFrom the recursion we can calculate that \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(6, \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\)\\) is \\!\\(TraditionalForm\\`3\\), while the function \ states, being that \\!\\(TraditionalForm\\`6\\) is of the form \ \\!\\(TraditionalForm\\`\\*TagBox[\\(\\(\\(6\\\\ 0\\)\\) + 6\\), \ HoldForm]\\), that our value is 3. Since they are both equal, we're \ done!\\n\\nNow, we verify the definition of each of the \ functions:\\n\\nChecking \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\ \[FilledSmallCircle], \\(\\({}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the \ form \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({}\\)\\)\ \\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - \ 1)\\)\\)\\)\\) + 6\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\ \\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 6\\)\\), \\(\\({3}\\)\ \\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({}\\)\\)\ \\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({}\\)\\)\ \\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 2\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({}\\)\\)\ \\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 3\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({}\\)\\)\ \\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 4\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({}\\)\\)\ \\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 5\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\ \\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 6\\)\\), \ \\(\\({}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \\!\\(TraditionalForm\\`\ \\(\\(\\(3\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 3\\)\\). Since both sides are \ equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\ \\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\)\\)\\), which is equal \ to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\ \\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\)\\)\\), which is equal \ to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\ \\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\)\\)\\), which is equal \ to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\ \\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\)\\)\\), which is equal \ to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\ \\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({}\\)\\)\\)\\))\\)\\)\\)\\), which is equal \ to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({2}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - \ 1)\\)\\)\\)\\) + 6\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + \ 6\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which \ is equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since \ both sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 2\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 3\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 4\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 5\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({3}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - \ 1)\\)\\)\\)\\) + 6\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + \ 6\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which \ is equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since \ both sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 1\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 2\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 3\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 4\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \ \\(\\({3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 5\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\ \\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({2, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1, 2}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + \ 6\\)\\), \\(\\({1}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 3\\)\\). \ Since both sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(3\\\\ q\\)\\). Since both sides are equal, we're \ done!\\n\\nFor an integer of the form \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ \ q\\)\\) + 3\\)\\) we have that \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\ \\)\\) + 1\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ q\\)\\) + 3\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({1}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1, 3}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + \ 6\\)\\), \\(\\({2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 3\\)\\). \ Since both sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({1, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both sides \ are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({2, 3}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\ \\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 6\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\), \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \ \\(\\((q - 1)\\)\\)\\)\\) + 6\\)\\), \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) + \ 1\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both sides \ are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\ \\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is \ equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both \ sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\ \\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is \ equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both \ sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\ \\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is \ equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). Since both \ sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\ \\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is \ equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\). Since both \ sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 6\\)\\), \\(\\({2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(max(\\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\ \\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\), \ \\(\\(\\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) + 1\\)\\)\\)\\))\\)\\)\\)\\), which is \ equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 3\\)\\). Since both \ sides are equal, we're done!\\n\\nChecking \ \\!\\(TraditionalForm\\`\\(a\\_\\({3}\\)(\\(\\(\[FilledSmallCircle], \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\):\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ \\(\\((q - 1)\\)\\)\\)\\) + \ 6\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ \\(\\((q - 1)\\)\\)\\)\\) + 3\\)\\). \ Since both sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 1\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \\!\\(TraditionalForm\\`\\(3\\\ \\ q\\)\\). Since both sides are equal, we're done!\\n\\nFor an integer of \ the form \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\) we have \ that \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 2\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \\!\\(TraditionalForm\\`\\(3\\\ \\ q\\)\\). Since both sides are equal, we're done!\\n\\nFor an integer of \ the form \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\) we have \ that \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\) \ \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \ \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\ \\(\\(\\(6\\\\ q\\)\\) + 3\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\)\\)\\), \ which is equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + 1\\)\\). \ Since both sides are equal, we're done!\\n\\nFor an integer of the form \ \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\) we have that \ \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 2\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, 2, \ 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \ \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 4\\)\\), \\(\\({1, \ 2}\\)\\)\\)\\))\\)\\)\\)\\), which is equal to \\!\\(TraditionalForm\\`\\(\\(\ \\(3\\\\ q\\)\\) + 2\\)\\). Since both sides are equal, we're done!\\n\\nFor \ an integer of the form \\!\\(TraditionalForm\\`\\(\\(\\(6\\\\ q\\)\\) + \ 6\\)\\) we have that \\!\\(TraditionalForm\\`\\(\\(\\(\\(\\(3\\\\ q\\)\\) + 3\ \\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + \ 6\\)\\), \\(\\({1, 2, 3}\\)\\)\\)\\))\\)\\) \[LongEqual] \\(\\(a\\_\\({3}\\)(\ \\(\\(\\(\\(\\(\\(6\\\\ q\\)\\) + 5\\)\\), \\(\\({1, 2}\\)\\)\\)\\))\\)\\)\\)\ \\), which is equal to \\!\\(TraditionalForm\\`\\(\\(\\(3\\\\ q\\)\\) + \ 3\\)\\). Since both sides are equal, we're done!\\n\\n\"\>"], "Output", CellChangeTimes->{ 3.4344710415625*^9, 3.435316092328125*^9, 3.435327141765625*^9, { 3.442060258203125*^9, 3.442060279265625*^9}, 3.442077901140625*^9, 3.442160288421875*^9, 3.44216062690625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "5", ",", "6", ",", "7", ",", "9", ",", "10", ",", "11", ",", "13", ",", "21", ",", "35", ",", "4", ",", "8"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.43532714621875*^9, 3.4353271644375*^9}, { 3.435327207890625*^9, 3.43532721178125*^9}, {3.435327661484375*^9, 3.435327703859375*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"A", "[", RowBox[{"1", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"2", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"3", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"4", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"5", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"6", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"7", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"8", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"9", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"10", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"11", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]}, { RowBox[{"A", "[", RowBox[{"12", "+", RowBox[{"12", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", "q"}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.435327155484375*^9, 3.435327164625*^9}, 3.43532721253125*^9, {3.435327665015625*^9, 3.435327704515625*^9}, 3.44206025921875*^9, 3.44216028903125*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"S", "=", RowBox[{"Snake", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "5"}], "}"}], ",", "8"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"S", ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]}], "Input", CellChangeTimes->{{3.435329050546875*^9, 3.43532906765625*^9}, { 3.435329169359375*^9, 3.435329170828125*^9}, {3.435329222140625*^9, 3.43532922315625*^9}, {3.435329530421875*^9, 3.435329530828125*^9}, 3.435330674359375*^9, {3.435331427953125*^9, 3.43533142809375*^9}, { 3.435332691765625*^9, 3.435332929171875*^9}, {3.43533296428125*^9, 3.435332964484375*^9}, 3.435333025828125*^9, {3.4353332285*^9, 3.4353332699375*^9}, {3.43533340046875*^9, 3.435333534890625*^9}, { 3.435333611546875*^9, 3.435333653984375*^9}}], Cell[BoxData[ RowBox[{"Snake", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "5"}], "}"}], ",", "8"}], "]"}]], "Output", CellChangeTimes->{{3.435332834640625*^9, 3.435332929890625*^9}, 3.435332965546875*^9, 3.435333026546875*^9, {3.43533322921875*^9, 3.435333270171875*^9}, {3.435333402421875*^9, 3.435333535125*^9}, { 3.435333615078125*^9, 3.435333654828125*^9}, 3.442060259265625*^9, 3.442160289046875*^9}], Cell[BoxData[ TagBox[ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"Snake", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "5"}], "}"}], ",", "8"}], "]"}], ",", RowBox[{"{", "}"}]}], "]"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.435332834640625*^9, 3.435332929890625*^9}, 3.435332965546875*^9, 3.435333026546875*^9, {3.43533322921875*^9, 3.435333270171875*^9}, {3.435333402421875*^9, 3.435333535125*^9}, { 3.435333615078125*^9, 3.435333654828125*^9}, 3.442060259265625*^9, 3.442160289046875*^9}] }, Open ]], Cell[BoxData["|"], "Input", CellChangeTimes->{3.435333489765625*^9}, EmphasizeSyntaxErrors->True], Cell[CellGroupData[{ Cell[BoxData["7"], "Input", CellChangeTimes->{3.43533348146875*^9}], Cell[BoxData["7"], "Output", CellChangeTimes->{3.435333481671875*^9, 3.442060260328125*^9, 3.442160290546875*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData["4"], "Input", CellChangeTimes->{3.435332855375*^9}], Cell[BoxData["4"], "Output", CellChangeTimes->{3.442060260359375*^9, 3.4421602905625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{"S", ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.435327168046875*^9, 3.435327194515625*^9}, { 3.43532835503125*^9, 3.4353283610625*^9}, {3.43532840109375*^9, 3.435328409640625*^9}, {3.435328592234375*^9, 3.435328604328125*^9}, { 3.43532893375*^9, 3.435328934140625*^9}, {3.435329039671875*^9, 3.43532911084375*^9}, {3.43532917384375*^9, 3.435329297515625*^9}, { 3.435329532984375*^9, 3.43532963246875*^9}, {3.4353296665625*^9, 3.435329666640625*^9}, {3.43533067653125*^9, 3.43533068453125*^9}, { 3.4353314305*^9, 3.43533147453125*^9}, {3.435331610296875*^9, 3.4353316104375*^9}, 3.4353327066875*^9}], Cell[BoxData[ TagBox[ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"Snake", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "5"}], "}"}], ",", "8"}], "]"}], ",", RowBox[{"{", "}"}]}], "]"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.435328410046875*^9, {3.4353285946875*^9, 3.4353286053125*^9}, 3.4353289345625*^9, {3.435329040625*^9, 3.43532911128125*^9}, { 3.435329174546875*^9, 3.43532929865625*^9}, {3.43532953340625*^9, 3.4353296456875*^9}, 3.43532968971875*^9, {3.435330677125*^9, 3.435330687265625*^9}, {3.43533143075*^9, 3.43533147490625*^9}, 3.4353316106875*^9, {3.435332707109375*^9, 3.435332720046875*^9}, 3.44206026040625*^9, 3.4421602905625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData["3"], "Input", CellChangeTimes->{3.435331436890625*^9}], Cell[BoxData["3"], "Output", CellChangeTimes->{3.43533143728125*^9, 3.4420602604375*^9, 3.442160290578125*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", RowBox[{"12", "/", "29"}], "]"}]], "Input", CellChangeTimes->{{3.43532977503125*^9, 3.4353297826875*^9}}], Cell[BoxData["0.41379310344827586`"], "Output", CellChangeTimes->{{3.435329776484375*^9, 3.435329782921875*^9}, 3.442060260484375*^9, 3.44216029059375*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5", ",", "6"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.435328476296875*^9, 3.4353284889375*^9}, { 3.435328644453125*^9, 3.435328645953125*^9}, {3.43532893859375*^9, 3.435328980609375*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"A", "[", RowBox[{"1", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"2", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"3", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"4", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"5", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"6", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"7", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"8", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"9", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"10", "+", RowBox[{"10", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.435328489375*^9, 3.435328646953125*^9, {3.43532893959375*^9, 3.435328980890625*^9}, 3.442060260609375*^9, 3.442160290640625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "5", ",", "6", ",", "8"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.435328648984375*^9, 3.43532865903125*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"A", "[", RowBox[{"1", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"2", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"3", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"4", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"5", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"6", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"7", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"8", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"9", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"10", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"11", "+", RowBox[{"11", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"3", " ", "q"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.4353286595*^9, 3.442060260796875*^9, 3.44216029071875*^9} ] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "6", ",", "7", ",", "9"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.4353286698125*^9, 3.43532867084375*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"A", "[", RowBox[{"1", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"2", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"3", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"4", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"5", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"6", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"7", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"8", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"9", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"10", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"11", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"12", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"13", "+", RowBox[{"13", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"4", " ", "q"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.435328671765625*^9, 3.44206026109375*^9, 3.442160290828125*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"WriteFunctionFromSets", "[", RowBox[{ RowBox[{"{", RowBox[{"7", ",", "9", ",", "10", ",", "12"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.435328699859375*^9, 3.43532873234375*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"A", "[", RowBox[{"1", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"1", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"2", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"2", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"3", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"3", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"4", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"4", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"5", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"5", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"6", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"6", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"7", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"8", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"9", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"10", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"11", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"12", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"13", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"14", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"15", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"16", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"17", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"18", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]}, { RowBox[{"A", "[", RowBox[{"19", "+", RowBox[{"19", " ", "q"}]}], "]"}], "\<\"=\"\>", RowBox[{"7", "+", RowBox[{"7", " ", "q"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{{3.43532870265625*^9, 3.43532873325*^9}, 3.442060262109375*^9, 3.442160291234375*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MaxAvoidSizeSequence", "[", RowBox[{"25", ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "5", ",", "6"}], "}"}], ",", RowBox[{"{", "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.435328425828125*^9, 3.435328434171875*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "1", ",", "1", ",", "2", ",", "2", ",", "2", ",", "2", ",", "2", ",", "2", ",", "2", ",", "3", ",", "3", ",", "3", ",", "4", ",", "4", ",", "4", ",", "4", ",", "4", ",", "4", ",", "4", ",", "5", ",", "5", ",", "5", ",", "6", ",", "6"}], "}"}]], "Output", CellChangeTimes->{3.435328434453125*^9, 3.442060262203125*^9, 3.44216029125*^9}] }, Open ]] }, Open ]] }, WindowSize->{657, 568}, WindowMargins->{{Automatic, 64}, {Automatic, 0}}, ShowSelection->True, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "Info3442142284-1171250"->{ Cell[131728, 3508, 138, 2, 45, "Print", CellTags->"Info3442142284-1171250"], Cell[131869, 3512, 8805, 224, 880, "Print", CellTags->"Info3442142284-1171250"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Info3442142284-1171250", 215916, 5277} } *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 383, 9, 80, "Input"], Cell[CellGroupData[{ Cell[976, 34, 216, 4, 36, "Subsection"], Cell[1195, 40, 4905, 142, 632, "Input"], Cell[6103, 184, 444, 13, 57, "Input"], Cell[6550, 199, 470, 12, 80, "Input"], Cell[7023, 213, 344, 10, 55, "Text"], Cell[7370, 225, 1175, 35, 126, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[8582, 265, 221, 6, 36, "Subsection"], Cell[8806, 273, 1959, 54, 241, "Input"], Cell[10768, 329, 726, 18, 103, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[11531, 352, 587, 13, 104, "Subsection"], Cell[12121, 367, 2010, 60, 264, "Input"], Cell[14134, 429, 3080, 83, 494, "Input"], Cell[17217, 514, 1922, 55, 195, "Input"], Cell[19142, 571, 90, 1, 33, "Input"], Cell[CellGroupData[{ Cell[19257, 576, 342, 8, 33, "Input"], Cell[19602, 586, 180, 4, 50, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[19831, 596, 696, 24, 70, "Subsection"], Cell[20530, 622, 2798, 69, 264, "Input"], Cell[23331, 693, 1543, 33, 195, "Input"], Cell[24877, 728, 2289, 57, 287, "Input"], Cell[27169, 787, 219, 5, 33, "Text"], Cell[27391, 794, 2367, 66, 241, "Input"], Cell[29761, 862, 618, 13, 121, "Text"], Cell[30382, 877, 2555, 71, 310, "Input"], Cell[32940, 950, 476, 7, 121, "Text"], Cell[33419, 959, 1416, 39, 172, "Input"], Cell[34838, 1000, 8021, 175, 609, "Input"], Cell[42862, 1177, 234, 6, 55, "Text"], Cell[43099, 1185, 1410, 39, 195, "Input"], Cell[44512, 1226, 3341, 84, 471, "Input"], Cell[47856, 1312, 254, 5, 55, "Text"], Cell[48113, 1319, 2306, 63, 356, "Input"], Cell[50422, 1384, 7107, 183, 747, "Input"], Cell[57532, 1569, 3166, 82, 356, "Input"], Cell[60701, 1653, 105, 1, 33, "Text"], Cell[60809, 1656, 3407, 89, 448, "Input"], Cell[64219, 1747, 321, 7, 55, "Text"], Cell[64543, 1756, 1712, 44, 333, "Input"], Cell[66258, 1802, 110, 1, 33, "Text"], Cell[66371, 1805, 1719, 43, 333, "Input"], Cell[68093, 1850, 390, 12, 55, "Text"], Cell[68486, 1864, 1001, 26, 149, "Input"], Cell[69490, 1892, 160, 3, 33, "Text"], Cell[69653, 1897, 1495, 34, 287, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[71185, 1936, 253, 5, 53, "Subsection"], Cell[71441, 1943, 266, 7, 55, "Text"], Cell[71710, 1952, 1594, 34, 264, "Input"], Cell[73307, 1988, 1278, 30, 195, "Input"], Cell[74588, 2020, 211, 4, 55, "Text"], Cell[74802, 2026, 1429, 32, 287, "Input"], Cell[76234, 2060, 1594, 39, 310, "Input"], Cell[77831, 2101, 402, 12, 77, "Text"], Cell[78236, 2115, 1568, 33, 264, "Input"], Cell[79807, 2150, 453, 12, 77, "Text"], Cell[80263, 2164, 1980, 45, 333, "Input"], Cell[82246, 2211, 363, 9, 55, "Text"], Cell[82612, 2222, 1612, 42, 172, "Input"], Cell[84227, 2266, 304, 9, 55, "Text"], Cell[84534, 2277, 1469, 43, 241, "Input"], Cell[86006, 2322, 174, 4, 33, "Text"], Cell[86183, 2328, 479, 15, 33, "Text"], Cell[86665, 2345, 1874, 42, 218, "Input"], Cell[88542, 2389, 2682, 62, 333, "Input"], Cell[91227, 2453, 1685, 32, 80, "Input"], Cell[92915, 2487, 4296, 114, 678, "Input"], Cell[97214, 2603, 5430, 140, 724, "Input"], Cell[102647, 2745, 610, 16, 126, "Input"], Cell[103260, 2763, 983, 26, 126, "Input"], Cell[104246, 2791, 1200, 29, 172, "Input"], Cell[105449, 2822, 236, 6, 55, "Text"], Cell[105688, 2830, 870, 23, 195, "Input"], Cell[106561, 2855, 1757, 41, 218, "Input"], Cell[108321, 2898, 937, 21, 172, "Input"], Cell[109261, 2921, 947, 25, 126, "Input"], Cell[110211, 2948, 1030, 26, 195, "Input"], Cell[111244, 2976, 788, 21, 80, "Input"], Cell[112035, 2999, 2898, 77, 402, "Input"], Cell[114936, 3078, 1588, 40, 241, "Input"], Cell[116527, 3120, 909, 24, 126, "Input"], Cell[117439, 3146, 3864, 94, 655, "Input"], Cell[121306, 3242, 2129, 55, 356, "Input"], Cell[123438, 3299, 6288, 143, 1276, "Input"], Cell[129729, 3444, 231, 9, 33, "Text"], Cell[CellGroupData[{ Cell[129985, 3457, 289, 7, 33, "Input"], Cell[130277, 3466, 500, 10, 57, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[130814, 3481, 268, 6, 33, "Input"], Cell[131085, 3489, 453, 8, 57, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[131575, 3502, 128, 2, 33, "Input"], Cell[CellGroupData[{ Cell[131728, 3508, 138, 2, 45, "Print", CellTags->"Info3442142284-1171250"], Cell[131869, 3512, 8805, 224, 880, "Print", CellTags->"Info3442142284-1171250"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[140723, 3742, 553, 11, 33, "Input"], Cell[141279, 3755, 2642, 80, 216, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[143958, 3840, 682, 12, 33, "Input"], Cell[144643, 3854, 49169, 708, 10606, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[193849, 4567, 506, 12, 80, "Input"], Cell[194358, 4581, 2496, 78, 254, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[196891, 4664, 874, 18, 57, "Input"], Cell[197768, 4684, 458, 10, 33, "Output"], Cell[198229, 4696, 626, 16, 47, "Output"] }, Open ]], Cell[198870, 4715, 99, 2, 33, "Input"], Cell[CellGroupData[{ Cell[198994, 4721, 68, 1, 33, "Input"], Cell[199065, 4724, 117, 2, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[199219, 4731, 66, 1, 33, "Input"], Cell[199288, 4734, 90, 1, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[199415, 4740, 752, 13, 33, "Input"], Cell[200170, 4755, 795, 19, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[201002, 4779, 69, 1, 33, "Input"], Cell[201074, 4782, 114, 2, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[201225, 4789, 142, 3, 33, "Input"], Cell[201370, 4794, 160, 2, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[201567, 4801, 373, 9, 33, "Input"], Cell[201943, 4812, 2457, 78, 216, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[204437, 4895, 287, 7, 57, "Input"], Cell[204727, 4904, 2559, 83, 234, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[207323, 4992, 285, 7, 57, "Input"], Cell[207611, 5001, 2916, 95, 272, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[210564, 5101, 289, 7, 57, "Input"], Cell[210856, 5110, 3993, 131, 386, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[214886, 5246, 271, 6, 33, "Input"], Cell[215160, 5254, 403, 8, 57, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)