(* 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[ 75000, 2074] NotebookOptionsPosition[ 73854, 2038] NotebookOutlinePosition[ 74196, 2053] CellTagsIndexPosition[ 74153, 2050] WindowFrame->Normal ContainsDynamic->True *) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j", ",", "i", ",", "g", ",", " ", "mark"}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "n", ",", "B", ",", "R", ",", "Tile", ",", "A", ",", "U", ",", "mark", ",", "T", ",", "g", ",", "x"}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"L", "=", RowBox[{"Expand", "[", RowBox[{ RowBox[{"Cyclotomic", "[", RowBox[{"2", ",", RowBox[{"x", "^", RowBox[{"(", "9", ")"}]}]}], "]"}], RowBox[{"Cyclotomic", "[", RowBox[{"3", ",", RowBox[{"x", "^", RowBox[{"(", "4", ")"}]}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "36"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"B", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "L", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "L", "]"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"B", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{"Mod", "[", RowBox[{ RowBox[{"L", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"B", "\[Union]", RowBox[{"{", "}"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j", ",", "i", ",", "g", ",", " ", "mark"}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "n", ",", "B", ",", "R", ",", "Tile", ",", "A", ",", "U", ",", "mark", ",", "T", ",", "g", ",", "x"}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "36"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"B", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "10"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", " ", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "B", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"B", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"RandomInteger", "[", RowBox[{"n", "-", "1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"i", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"B", "\[Union]", RowBox[{"{", "}"}]}]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"B", "=", RowBox[{"{", RowBox[{"0", ",", "4", ",", "8", ",", "9", ",", "13", ",", "17"}], "}"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Length", "[", "B", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "1000000"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"R", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "n"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}], ",", "n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", "1", "]"}], "]"}], "=", "B"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"mark", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", RowBox[{ RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}], "+", "1"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"T", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{ RowBox[{"{", "0", "}"}], "&"}], ",", RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g", "=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", " ", RowBox[{"i", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "\[Equal]", "n"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"Tile", "[", RowBox[{"[", "g", "]"}], "]"}], "=", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", RowBox[{"g", "=", RowBox[{"g", "+", "1"}]}], ";", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ";", RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", " ", RowBox[{"j", "\[LessEqual]", "n"}], ",", RowBox[{ RowBox[{"k", "=", "100"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"Mod", "[", RowBox[{"j", ",", "n"}], "]"}]}], "]"}], "]"}], ",", " ", RowBox[{ RowBox[{"k", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", " ", RowBox[{"m", "\[LessEqual]", RowBox[{"Length", "[", "B", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Intersection]", " ", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"j", "-", RowBox[{"B", "[", RowBox[{"[", "m", "]"}], "]"}]}], ")"}], "+", "B"}], ",", "n"}], "]"}]}], "\[Equal]", RowBox[{"{", "}"}]}], ",", " ", RowBox[{ RowBox[{"k", "=", RowBox[{"k", "+", "1"}]}], ";", " ", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "j", ",", "m"}], "]"}], "]"}], "=", RowBox[{"Mod", "[", RowBox[{ RowBox[{"j", "-", RowBox[{"B", "[", RowBox[{"[", "m", "]"}], "]"}]}], ",", "n"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m", "++"}]}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"R", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "k"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"min", "=", RowBox[{"Min", "[", "R", "]"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{"min", "\[Equal]", "0"}], "]"}], ")"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"t", "=", RowBox[{"Catch", "[", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"R", "[", RowBox[{"[", "ii", "]"}], "]"}], "\[Equal]", "min"}], ",", " ", RowBox[{"Throw", "[", "ii", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"ii", ",", "n"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "\[LessEqual]", RowBox[{"Length", "[", "B", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"b", "=", RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", " ", RowBox[{"b", "<=", RowBox[{"Length", "[", "B", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"b", "+", "1"}]}], ";", RowBox[{"z", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "t", ",", "b"}], "]"}], "]"}], "\[Equal]", "200"}], "]"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Union]", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "t", ",", "b"}], "]"}], "]"}], "+", "B"}], ",", "n"}], "]"}]}]}], ";", " ", RowBox[{ RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Union]", RowBox[{"{", RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "t", ",", "b"}], "]"}], "]"}], "}"}]}]}], ";", " ", RowBox[{"b", "=", RowBox[{ RowBox[{"Length", "[", "B", "]"}], "+", "1"}]}], ";", RowBox[{"z", "=", "1"}], ";", RowBox[{"i", "=", RowBox[{"i", "+", "1"}]}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"b", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "==", "0"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", " ", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", " ", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tile", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "Tile", "]"}], "\[IndentingNewLine]", "Tile", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"(*", " ", RowBox[{ RowBox[{ "So", " ", "we", " ", "have", " ", "tiles", " ", "mod", " ", "36.", " ", "Instead", " ", "of", " ", "shifting", " ", "the", " ", "elements"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"i", " ", "run", " ", "the", " ", "fill"}], "-", RowBox[{"out", " ", "procedure", " ", "for", " ", "n"}]}], "=", RowBox[{"144", " ", "and", " ", "the", " ", "shifted", " ", "B", " ", RowBox[{"below", ".", " ", "It"}], " ", "gives", " ", "the", " ", RowBox[{"same", "."}]}]}]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j", ",", "i", ",", "g", ",", " ", "mark"}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "n", ",", "B", ",", "R", ",", "Tile", ",", "A", ",", "U", ",", "mark", ",", "T", ",", "g", ",", "x"}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "144"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"B", "=", RowBox[{"{", RowBox[{"0", ",", "4", ",", "8", ",", "9", ",", "13", ",", "17"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"B", "=", RowBox[{"B", "\[Union]", RowBox[{"(", RowBox[{"B", "+", "36"}], ")"}], "\[Union]", RowBox[{"(", RowBox[{"B", "+", "72"}], ")"}], "\[Union]", RowBox[{"(", RowBox[{"B", "+", "108"}], ")"}]}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Length", "[", "B", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "1000000"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"R", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "n"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}], ",", "n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", "1", "]"}], "]"}], "=", "B"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"mark", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", RowBox[{ RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}], "+", "1"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"T", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{ RowBox[{"{", "0", "}"}], "&"}], ",", RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g", "=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", " ", RowBox[{"i", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "\[Equal]", "n"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"Tile", "[", RowBox[{"[", "g", "]"}], "]"}], "=", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", RowBox[{"g", "=", RowBox[{"g", "+", "1"}]}], ";", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ";", RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", " ", RowBox[{"j", "\[LessEqual]", "n"}], ",", RowBox[{ RowBox[{"k", "=", "100"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"Mod", "[", RowBox[{"j", ",", "n"}], "]"}]}], "]"}], "]"}], ",", " ", RowBox[{ RowBox[{"k", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", " ", RowBox[{"m", "\[LessEqual]", RowBox[{"Length", "[", "B", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Intersection]", " ", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"j", "-", RowBox[{"B", "[", RowBox[{"[", "m", "]"}], "]"}]}], ")"}], "+", "B"}], ",", "n"}], "]"}]}], "\[Equal]", RowBox[{"{", "}"}]}], ",", " ", RowBox[{ RowBox[{"k", "=", RowBox[{"k", "+", "1"}]}], ";", " ", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "j", ",", "m"}], "]"}], "]"}], "=", RowBox[{"Mod", "[", RowBox[{ RowBox[{"j", "-", RowBox[{"B", "[", RowBox[{"[", "m", "]"}], "]"}]}], ",", "n"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m", "++"}]}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"R", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "k"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"min", "=", RowBox[{"Min", "[", "R", "]"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{"min", "\[Equal]", "0"}], "]"}], ")"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"t", "=", RowBox[{"Catch", "[", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"R", "[", RowBox[{"[", "ii", "]"}], "]"}], "\[Equal]", "min"}], ",", " ", RowBox[{"Throw", "[", "ii", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"ii", ",", "n"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "\[LessEqual]", RowBox[{"Length", "[", "B", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"b", "=", RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", " ", RowBox[{"b", "<=", RowBox[{"Length", "[", "B", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"b", "+", "1"}]}], ";", RowBox[{"z", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "t", ",", "b"}], "]"}], "]"}], "\[Equal]", "200"}], "]"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"U", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Union]", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "t", ",", "b"}], "]"}], "]"}], "+", "B"}], ",", "n"}], "]"}]}]}], ";", " ", RowBox[{ RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Union]", RowBox[{"{", RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "t", ",", "b"}], "]"}], "]"}], "}"}]}]}], ";", " ", RowBox[{"b", "=", RowBox[{ RowBox[{"Length", "[", "B", "]"}], "+", "1"}]}], ";", RowBox[{"z", "=", "1"}], ";", RowBox[{"i", "=", RowBox[{"i", "+", "1"}]}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"b", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "==", "0"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", " ", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", " ", RowBox[{ RowBox[{ RowBox[{"mark", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"T", "[", RowBox[{"[", "i", "]"}], "]"}], "=", RowBox[{"T", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"i", "-", "1"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tile", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "Tile", "]"}], "\[IndentingNewLine]", RowBox[{"Tile", ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "Tile", "]"}]}], ",", " ", RowBox[{ RowBox[{"P", "=", RowBox[{"Tile", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "2"}], ",", " ", RowBox[{"i", "<=", RowBox[{"Length", "[", "P", "]"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"Tile", ",", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"P", "-", RowBox[{"P", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", "n"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], "]"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"Tile", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "0"}], ";", RowBox[{"i", "=", RowBox[{ RowBox[{"Length", "[", "P", "]"}], "+", "1"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tile", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "Tile", "]"}], "\[IndentingNewLine]", "Tile", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{ "Here", " ", "comes", " ", "an", " ", "old", " ", "and", " ", "badly", " ", "programmed", " ", "version", " ", "of", " ", "the", " ", "Fourier"}], "-", RowBox[{ RowBox[{"selection", ".", " ", "But"}], " ", "it", " ", "is", " ", "correct"}]}], ",", " ", RowBox[{ "just", " ", "annoyingly", " ", "many", " ", "notations", " ", "and", " ", "sets", " ", RowBox[{"appearing", "."}]}]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j", ",", "v", ",", "vvv", ",", "vvvv"}], "}"}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"T2", "=", "Tile"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", "H", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Length", "[", "T2", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"H", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Length", "[", "T2", "]"}], ",", "144"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MF", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MT", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "T2", "]"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", " ", RowBox[{"k", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"T2", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"Mod", "[", RowBox[{"k", ",", "144"}], "]"}]}], "]"}], ",", RowBox[{ RowBox[{"H", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], "=", "1"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"v", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "T2", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", " ", RowBox[{"k", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "==", RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], ")"}], "\[And]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}], "\[Or]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}]}], ")"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"MF", "[", RowBox[{"[", "v", "]"}], "]"}], "=", RowBox[{"H", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"MT", "[", RowBox[{"[", "v", "]"}], "]"}], "=", RowBox[{"T2", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"v", "=", RowBox[{"v", "+", "1"}]}], ";", " ", RowBox[{"k", "=", "145"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"MT", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"MT", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MF", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"MF", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "MF", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"MMF", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MMT", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vvv", "=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "MF", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", " ", RowBox[{"k", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "==", RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MF", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], ")"}], "\[And]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}], "\[Or]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MF", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}]}], ")"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"MMF", "[", RowBox[{"[", "vvv", "]"}], "]"}], "=", RowBox[{"MF", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"MMT", "[", RowBox[{"[", "vvv", "]"}], "]"}], "=", RowBox[{"MT", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"vvv", "=", RowBox[{"vvv", "+", "1"}]}], ";", " ", RowBox[{"k", "=", "145"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"MMT", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"MMT", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MMF", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"MMF", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "MMF", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"MMMF", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MMMT", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vvvv", "=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "MMF", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", " ", RowBox[{"k", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "==", RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMF", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], ")"}], "\[And]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}], "\[Or]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMF", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}]}], ")"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"MMMF", "[", RowBox[{"[", "vvvv", "]"}], "]"}], "=", RowBox[{"MMF", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"MMMT", "[", RowBox[{"[", "vvvv", "]"}], "]"}], "=", RowBox[{"MMT", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"vvvv", "=", RowBox[{"vvvv", "+", "1"}]}], ";", " ", RowBox[{"k", "=", "145"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"MMMT", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"MMMT", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MMMF", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"MMMF", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "MMMF", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"M4F", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"M4T", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"v4", "=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "MMMF", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", " ", RowBox[{"k", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMMF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "==", RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMMF", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], ")"}], "\[And]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMMF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}], "\[Or]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMMF", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}]}], ")"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"M4F", "[", RowBox[{"[", "v4", "]"}], "]"}], "=", RowBox[{"MMMF", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"M4T", "[", RowBox[{"[", "v4", "]"}], "]"}], "=", RowBox[{"MMMT", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"v4", "=", RowBox[{"v4", "+", "1"}]}], ";", " ", RowBox[{"k", "=", "145"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"M4T", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"M4T", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"M4F", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"M4F", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "M4F", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j", ",", "v5"}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"M5F", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"M5T", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "T2", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"v5", "=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "M4F", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", " ", RowBox[{"k", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Not", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"M4F", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "==", RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"M4F", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], ")"}], "\[And]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"M4F", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}], "\[Or]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"M4F", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}]}], ")"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"M5F", "[", RowBox[{"[", "v5", "]"}], "]"}], "=", RowBox[{"M4F", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"M5T", "[", RowBox[{"[", "v5", "]"}], "]"}], "=", RowBox[{"M4T", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"v5", "=", RowBox[{"v5", "+", "1"}]}], ";", " ", RowBox[{"k", "=", "145"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"M5T", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"M5T", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"M5F", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"M5F", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "M5F", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"F1", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F2", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F3", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F4", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F5", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"J", "=", RowBox[{"{", RowBox[{ RowBox[{"T2", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"MT", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"MMT", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"MMMT", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"M4T", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"F1", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "0"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"F2", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "0"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"F3", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "0"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MMMF", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"F4", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "0"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"M4F", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"F5", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "0"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"F1", ";"}], "\[IndentingNewLine]", RowBox[{"F2", ";"}], "\[IndentingNewLine]", RowBox[{"F3", ";"}], "\[IndentingNewLine]", RowBox[{"F4", ";"}], "\[IndentingNewLine]", RowBox[{"F5", ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3", ",", "8", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}]}], "}"}], ";"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"FF1", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF2", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF3", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF4", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF5", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "144"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"F1", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"FF1", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "j"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"F2", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"FF2", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "j"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"F3", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"FF3", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "j"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"F4", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"FF4", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "j"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"F5", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"FF5", "[", RowBox[{"[", "j", "]"}], "]"}], "=", "j"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"FF1", "=", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"FF1", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF2", "=", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"FF2", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF3", "=", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"FF3", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF4", "=", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"FF4", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FF5", "=", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"FF5", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"FF", "=", RowBox[{"{", RowBox[{"FF1", ",", "FF2", ",", "FF3", ",", "FF4", ",", "FF5"}], "}"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "5"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"FF", "[", RowBox[{"[", "m", "]"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FF", "[", RowBox[{"[", RowBox[{"m", ",", "j"}], "]"}], "]"}], "=", RowBox[{"GCD", "[", RowBox[{ RowBox[{"FF", "[", RowBox[{"[", RowBox[{"m", ",", "j"}], "]"}], "]"}], ",", "144"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "5"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FF", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{ RowBox[{"FF", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"FF", ";"}], "\[IndentingNewLine]", RowBox[{"FT", "=", RowBox[{"144", "/", "FF"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CFT", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "FT", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "FT", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CFT", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Divisors", "[", "144", "]"}], ",", RowBox[{"FT", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "CFT", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.43221349971875*^9, 3.43221350225*^9}, { 3.432213535578125*^9, 3.432213625875*^9}, {3.432213685125*^9, 3.432213700828125*^9}, {3.432213767796875*^9, 3.432213792703125*^9}, { 3.433655398875*^9, 3.4336554714375*^9}, {3.4336555168125*^9, 3.4336555699375*^9}}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`j, $CellContext`i, $CellContext`g, $CellContext`mark}, StandardForm], ImageSizeCache->{242.0625, {2., 8.}}]], "Output", CellChangeTimes->{3.432213820265625*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"0", ",", "4", ",", "8", ",", "9", ",", "13", ",", "17"}], "}"}]], "Output", CellChangeTimes->{3.4322138203125*^9}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`j, $CellContext`i, $CellContext`g, $CellContext`mark}, StandardForm], ImageSizeCache->{242.0625, {2., 8.}}]], "Output", CellChangeTimes->{3.432213820328125*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"0", ",", "4", ",", "8", ",", "9", ",", "13", ",", "17"}], "}"}]], "Output", CellChangeTimes->{3.432213820328125*^9}], Cell[BoxData["6"], "Output", CellChangeTimes->{3.432213821*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "2", ",", "12", ",", "14", ",", "24", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "3", ",", "6", ",", "18", ",", "21", ",", "24"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "3", ",", "15", ",", "18", ",", "21", ",", "33"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "6", ",", "12", ",", "18", ",", "24", ",", "30"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "10", ",", "12", ",", "22", ",", "24", ",", "34"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "12", ",", "15", ",", "18", ",", "30", ",", "33"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.432213821*^9}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`j, $CellContext`i, $CellContext`g, $CellContext`mark}, StandardForm], ImageSizeCache->{242.0625, {2., 8.}}]], "Output", CellChangeTimes->{3.432213821015625*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", "4", ",", "8", ",", "9", ",", "13", ",", "17", ",", "36", ",", "40", ",", "44", ",", "45", ",", "49", ",", "53", ",", "72", ",", "76", ",", "80", ",", "81", ",", "85", ",", "89", ",", "108", ",", "112", ",", "116", ",", "117", ",", "121", ",", "125"}], "}"}]], "Output", CellChangeTimes->{3.432213821015625*^9}], Cell[BoxData["6144"], "Output", CellChangeTimes->{3.432214394921875*^9}], Cell[BoxData["1022"], "Output", CellChangeTimes->{3.432214404046875*^9}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`j, $CellContext`v, $CellContext`vvv, \ $CellContext`vvvv}, StandardForm], ImageSizeCache->{103.5625, {2., 8.}}]], "Output", CellChangeTimes->{3.432214404125*^9}], Cell[BoxData["1022"], "Output", CellChangeTimes->{3.432214404125*^9}], Cell[BoxData["1002"], "Output", CellChangeTimes->{3.432214407546875*^9}], Cell[BoxData["490"], "Output", CellChangeTimes->{3.432214445421875*^9}], Cell[BoxData["170"], "Output", CellChangeTimes->{3.43221446715625*^9}], Cell[BoxData["10"], "Output", CellChangeTimes->{3.432214477203125*^9}], Cell[BoxData[ DynamicBox[ToBoxes[{$CellContext`j, $CellContext`v5}, StandardForm], ImageSizeCache->{53.1875, {2., 8.}}]], "Output", CellChangeTimes->{3.43221447721875*^9}], Cell[BoxData["0"], "Output", CellChangeTimes->{3.432214477734375*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "26", ",", "50", ",", "74", ",", "96", ",", "120"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "30", ",", "54", ",", "78", ",", "96", ",", "120"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "30", ",", "54", ",", "84", ",", "105", ",", "123"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "30", ",", "60", ",", "78", ",", "90", ",", "120"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "38", ",", "62", ",", "96", ",", "120", ",", "122"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.432214477734375*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"72", ",", "36", ",", "18", ",", "9", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"36", ",", "12", ",", "9", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"36", ",", "18", ",", "9", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"36", ",", "18", ",", "12", ",", "9", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"72", ",", "36", ",", "18", ",", "12", ",", "9", ",", "4"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.43221447784375*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "6", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "6", ",", "8", ",", "16", ",", "18", ",", "24", ",", "48", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "6", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "6", ",", "8", ",", "16", ",", "24", ",", "48", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "6", ",", "8", ",", "16", ",", "24", ",", "48", ",", "144"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.43221447784375*^9}] }, Open ]] }, WindowSize->{1017, 567}, WindowMargins->{{Automatic, 75}, {Automatic, 51}}, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 67993, 1847, 6332, "Input"], Cell[68586, 1872, 218, 5, 30, "Output"], Cell[68807, 1879, 158, 4, 30, "Output"], Cell[68968, 1885, 218, 5, 30, "Output"], Cell[69189, 1892, 160, 4, 30, "Output"], Cell[69352, 1898, 64, 1, 30, "Output"], Cell[69419, 1901, 737, 21, 50, "Output"], Cell[70159, 1924, 218, 5, 30, "Output"], Cell[70380, 1931, 376, 7, 30, "Output"], Cell[70759, 1940, 73, 1, 30, "Output"], Cell[70835, 1943, 73, 1, 30, "Output"], Cell[70911, 1946, 215, 5, 30, "Output"], Cell[71129, 1953, 70, 1, 30, "Output"], Cell[71202, 1956, 73, 1, 30, "Output"], Cell[71278, 1959, 72, 1, 30, "Output"], Cell[71353, 1962, 71, 1, 30, "Output"], Cell[71427, 1965, 71, 1, 30, "Output"], Cell[71501, 1968, 175, 3, 30, "Output"], Cell[71679, 1973, 70, 1, 30, "Output"], Cell[71752, 1976, 647, 18, 30, "Output"], Cell[72402, 1996, 548, 14, 30, "Output"], Cell[72953, 2012, 885, 23, 50, "Output"] }, Open ]] } ] *) (* End of internal cache information *)