(* 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[ 147228, 3879] NotebookOptionsPosition[ 144312, 3782] NotebookOutlinePosition[ 144655, 3797] CellTagsIndexPosition[ 144612, 3794] WindowFrame->Normal ContainsDynamic->True *) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{ "This", " ", "file", " ", "is", " ", "a", " ", "numeric", " ", "proof", " ", "of", " ", "the", " ", "fact", " ", "that", " ", "there", " ", "is", " ", "no", " ", "non"}], "-", RowBox[{ "periodic", " ", "tiling", " ", "in", " ", "the", " ", "hardes", " ", "case", " ", RowBox[{"{", RowBox[{"2", ",", "4", ",", "8", ",", "16"}], "}"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "But"}], " ", "later", " ", "i", " ", "found", " ", "the", " ", "following", " ", "proof", " ", "by", " ", RowBox[{"theory", ":", " ", "\[IndentingNewLine]", RowBox[{"By", " ", "a", " ", "theorem", " ", "of", " ", "Sands", " ", RowBox[{"(", RowBox[{ RowBox[{"see", " ", "C"}], "-", RowBox[{"M", " ", "paper"}]}], ")"}], " ", "one", " ", "of", " ", "the", " ", "tiles", " ", "is", " ", "contained", " ", "in", " ", "some", " ", "subgroup", " ", RowBox[{"pZ", ".", " ", "If"}], " ", "it", " ", "is", " ", "the", " ", "tile", " ", "of", " ", "length", " ", "16"}]}]}], ",", " ", RowBox[{"say", " ", "A"}], ",", " ", RowBox[{ RowBox[{ "then", " ", "it", " ", "must", " ", "be", " ", "contained", " ", "in", " ", "the", " ", "subgroup", " ", RowBox[{"{", RowBox[{"0", ",", "3", ",", "6", ",", "..."}], "}"}], " ", "of", " ", "48", " ", RowBox[{"elements", ".", " ", "Then"}], " ", "the", " ", "tiling", " ", "of", " ", "Z_", "144", " ", "is", " ", "composed", " ", "of", " ", "3", " ", "tilings", " ", "of", " ", "Z_", "48", " ", "in", " ", "the", " ", "usual", " ", "manner", " ", RowBox[{"A", "/", "3"}]}], "+", RowBox[{"B1", "/", "3"}]}], ",", " ", RowBox[{ RowBox[{"etc", ".", " ", "If"}], " ", RowBox[{"A", "/", "3"}], " ", "is", " ", "periodic"}], ",", " ", RowBox[{"there", " ", "is", " ", "nothing", " ", "to", " ", RowBox[{"prove", ".", " ", "If"}], " ", "it", " ", "is", " ", "not"}], ",", " ", RowBox[{"then", " ", RowBox[{"B1", "/", "3"}], " ", "must", " ", "be", " ", "periodic", " ", RowBox[{ RowBox[{"(", RowBox[{ "because", " ", "every", " ", "tiling", " ", "of", " ", "Z_", "48", " ", "is", " ", "periodic"}], ")"}], ".", " ", "And"}], " ", "it", " ", "is", " ", "trivial", " ", "that", " ", "the", " ", "period", " ", "of", " ", RowBox[{"B1", "/", "3"}], " ", "must", " ", "be", " ", "16"}], ",", " ", RowBox[{ "so", " ", "that", " ", "B1", " ", "is", " ", "periodic", " ", "by", " ", "48.", " ", "In", " ", "the", " ", "same", " ", "way", " ", "B2", " ", "and", " ", "B3", " ", "is", " ", "also", " ", "periodic", " ", "by", " ", "48"}], ",", " ", RowBox[{"and", " ", "so", " ", "is", " ", RowBox[{"B", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "If"}], " ", "B", " ", "is", " ", "contained", " ", "in", " ", "pZ"}], ",", " ", RowBox[{ RowBox[{ "then", " ", "it", " ", "must", " ", "be", " ", "the", " ", "subgroup", " ", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "2", ",", "4", ",", "..."}], "}"}], ".", " ", "And"}], " ", "A"}], "+", RowBox[{ "B", " ", "is", " ", "composed", " ", "of", " ", "two", " ", "tilings", " ", "of", " ", "Z_", "72"}]}], ",", " ", RowBox[{ RowBox[{"B", "/", "2"}], "+", RowBox[{ RowBox[{"A1", "/", "2"}], " ", RowBox[{"etc", ".", " ", "The"}], " ", "length", " ", "of", " ", "B", " ", "is", " ", "9", " ", "so"}]}], ",", " ", RowBox[{ "and", " ", "all", " ", "tilings", " ", "of", " ", "Z_", "72", " ", "of", " ", "lengths", " ", "8", " ", "and", " ", "9", " ", "are", " ", RowBox[{"periodic", ".", " ", RowBox[{"Therefore", ":", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"-", " ", "either"}], " ", RowBox[{"B", "/", "2"}], " ", "is", " ", "periodic"}]}]}]}], ",", " ", RowBox[{"and", " ", "we", " ", "are", " ", RowBox[{"done", ".", "\[IndentingNewLine]", RowBox[{"-", " ", "or"}]}], " ", RowBox[{"A1", "/", "2"}], " ", "is", " ", RowBox[{"periodic", ".", " ", "Then"}], " ", "it", " ", "must", " ", "be", " ", "periodic", " ", "by", " ", "36.", " ", "And", " ", "so", " ", "A1", " ", "is", " ", "periodic", " ", "by", " ", "72.", " ", "In", " ", "the", " ", "same", " ", "way", " ", "A2", " ", "is", " ", "also", " ", "periodic", " ", "by", " ", "72"}], ",", " ", RowBox[{"and", " ", "so", " ", "is", " ", RowBox[{ "A", ".", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", "I"}], " ", "do", " ", "not", " ", "comment", " ", "the", " ", "numeric", " ", "proof", " ", "although", " ", "it", " ", "contains", " ", "some", " ", "very", " ", "neat", " ", "tricks", " ", "to", " ", "cut", " ", "down", " ", "the", " ", "number", " ", "of", " ", "cases", " ", "whihch", " ", "is", " ", "really", " ", "overwhelming", " ", "for", " ", "this", " ", RowBox[{"partition", "."}]}]}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j1", ",", "j2", ",", "j3", ",", " ", "j4", ",", " ", "d"}], "}"}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Can", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "100000"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"d", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "16"}], ";"}], " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"AA", "=", RowBox[{"Table", "[", RowBox[{"i", ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"-", "n"}], "+", "1"}], ",", RowBox[{"n", "-", "1"}]}], "}"}]}], "]"}]}], ";", RowBox[{"B", "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Exp", "[", RowBox[{"2", "\[Pi]", " ", RowBox[{"\[ImaginaryI]", " ", "/", " ", "n"}], " ", "AA"}], "]"}], ",", "6"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"BB", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{ RowBox[{"N", "[", RowBox[{ RowBox[{"Exp", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"-", "1"}], ")"}], "^", "#"}], "\[Pi]", " ", RowBox[{"\[ImaginaryI]", " ", "/", " ", "n"}]}], " ", "]"}], ",", "6"}], "]"}], "&"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"{", "0", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{"eps", "=", RowBox[{"N", "[", RowBox[{ RowBox[{"40", " ", RowBox[{"3.142", "/", "144"}]}], ",", " ", "6"}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j1", "=", "0"}], ",", " ", RowBox[{"j1", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j2", "=", "j1"}], ",", " ", RowBox[{"j2", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j3", "=", "j2"}], ",", " ", RowBox[{"j3", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j4", "=", "j3"}], ",", " ", RowBox[{"j4", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j5", "=", "j4"}], ",", " ", RowBox[{"j5", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j6", "=", "j5"}], ",", " ", RowBox[{"j6", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j7", "=", "j6"}], ",", " ", RowBox[{"j7", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j8", "=", "j7"}], ",", " ", RowBox[{"j8", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"P", "=", RowBox[{"{", RowBox[{ "0", ",", "j1", ",", "j2", ",", "j3", ",", "j4", ",", "j5", ",", "j6", ",", "j7", ",", "j8"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", " ", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"1", "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "2", "]"}], "]"}], " ", "+", "n"}], "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "3", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "4", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "5", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "6", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "7", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "8", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}], "+", RowBox[{"B", "[", RowBox[{"[", " ", RowBox[{ RowBox[{"P", "[", RowBox[{"[", "9", "]"}], "]"}], "+", "n"}], " ", "]"}], "]"}]}], " ", "]"}], "<", " ", "eps"}], ",", RowBox[{ RowBox[{ RowBox[{"Can", "[", RowBox[{"[", "d", "]"}], "]"}], "=", "P"}], ";", " ", RowBox[{"d", "=", RowBox[{"d", "+", "1"}]}]}]}], "]"}], ";", RowBox[{"m", "=", RowBox[{"m", "+", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{"j8", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j7", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j6", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j5", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j4", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j3", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j1", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Can", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Can", "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "Can", "]"}], "\[IndentingNewLine]", "m"}]}]], "Input", CellChangeTimes->{{3.431939484859375*^9, 3.43193961525*^9}, { 3.43193966240625*^9, 3.4319397478125*^9}, {3.431939837390625*^9, 3.43193989221875*^9}, {3.4319399531875*^9, 3.431940032921875*^9}, { 3.43194006503125*^9, 3.43194030175*^9}, {3.4319405184375*^9, 3.431940617015625*^9}, {3.431940660796875*^9, 3.4319406620625*^9}, { 3.4319408474375*^9, 3.43194086946875*^9}, {3.43194090396875*^9, 3.431940936765625*^9}, {3.431940990796875*^9, 3.4319410360625*^9}, { 3.43194119059375*^9, 3.43194121715625*^9}, {3.4319415729375*^9, 3.4319415884375*^9}, {3.431941658921875*^9, 3.4319417540625*^9}, { 3.43194181496875*^9, 3.43194185803125*^9}, {3.431941903328125*^9, 3.4319419034375*^9}, {3.4319421240625*^9, 3.4319421276875*^9}, { 3.43194239625*^9, 3.431942396359375*^9}, {3.4319426083125*^9, 3.431942615765625*^9}, {3.431944901890625*^9, 3.431944904921875*^9}, { 3.43194508296875*^9, 3.431945098140625*^9}, {3.431946921328125*^9, 3.43194694621875*^9}, {3.432227122390625*^9, 3.432227609046875*^9}, { 3.432227674875*^9, 3.43222779271875*^9}, {3.432227843796875*^9, 3.4322279955*^9}, 3.4322280941875*^9, {3.43222828253125*^9, 3.43222834075*^9}, {3.433654218875*^9, 3.4336542729375*^9}, 3.4336552064375*^9}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`j1, $CellContext`j2, $CellContext`j3, \ $CellContext`j4, $CellContext`d}, StandardForm], ImageSizeCache->{121.75, {2., 8.}}]], "Output", CellChangeTimes->{3.43194030378125*^9, 3.431940625421875*^9, 3.431940663484375*^9, 3.4319412885625*^9, 3.431941619203125*^9, 3.4319417585625*^9, 3.431941904984375*^9, 3.431942137953125*^9, 3.431942401078125*^9, 3.431942617890625*^9, 3.431944907625*^9, 3.43194508615625*^9, 3.43194694765625*^9, 3.432036039015625*^9, 3.432097250875*^9}], Cell[BoxData["0.8727777777777778`"], "Output", CellChangeTimes->{3.43194030378125*^9, 3.431940625421875*^9, 3.431940663484375*^9, 3.4319412885625*^9, 3.431941619203125*^9, 3.4319417585625*^9, 3.431941904984375*^9, 3.431942137953125*^9, 3.431942401078125*^9, 3.431942617890625*^9, 3.431944907625*^9, 3.43194508615625*^9, 3.43194694765625*^9, 3.432036039015625*^9, 3.43209725096875*^9}], Cell[BoxData["27341"], "Output", CellChangeTimes->{3.43194030378125*^9, 3.431940625421875*^9, 3.431940663484375*^9, 3.4319412885625*^9, 3.431941619203125*^9, 3.4319417585625*^9, 3.431941904984375*^9, 3.431942137953125*^9, 3.431942401078125*^9, 3.431942617890625*^9, 3.431944907625*^9, 3.43194508615625*^9, 3.43194694765625*^9, 3.432036039015625*^9, 3.432097273125*^9}], Cell[BoxData["490315"], "Output", CellChangeTimes->{3.43194030378125*^9, 3.431940625421875*^9, 3.431940663484375*^9, 3.4319412885625*^9, 3.431941619203125*^9, 3.4319417585625*^9, 3.431941904984375*^9, 3.431942137953125*^9, 3.431942401078125*^9, 3.431942617890625*^9, 3.431944907625*^9, 3.43194508615625*^9, 3.43194694765625*^9, 3.432036039015625*^9, 3.432097273140625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"Can", "[", RowBox[{"[", "1", "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.4320362148125*^9, 3.432036219296875*^9}, { 3.432038476546875*^9, 3.432038476796875*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", "0", ",", "0", ",", "0", ",", "2", ",", "8", ",", "8", ",", "8", ",", "9"}], "}"}]], "Output", CellChangeTimes->{3.43203622046875*^9, 3.432038478421875*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j", ",", "k", ",", RowBox[{"Length", "[", "V", "]"}], ",", "h", ",", " ", RowBox[{"Length", "[", "Can", "]"}]}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "144"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"w1", "=", RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", RowBox[{"Pi", " ", "/", "144"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"w2", "=", RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", RowBox[{"Pi", " ", "/", "16"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"h", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Tilea", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", " ", "100000"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "Can", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"P", "=", RowBox[{"{", RowBox[{"Can", "[", RowBox[{"[", "j", "]"}], "]"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"V", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Prepend", "[", RowBox[{"#", ",", "0"}], "]"}], "&"}], "/@", RowBox[{"Flatten", "[", " ", RowBox[{ RowBox[{"Permutations", "/@", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Drop", "[", RowBox[{"#", ",", "1"}], "]"}], "&"}], "/@", "P"}], ")"}]}], ",", "1"}], "]"}]}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", RowBox[{"k", "\[LessEqual]", RowBox[{"Length", "[", "V", "]"}]}], ",", " ", RowBox[{ RowBox[{"PR", "=", RowBox[{"V", "[", RowBox[{"[", "k", "]"}], "]"}]}], ";", " ", RowBox[{"KR", "=", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"1", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ",", RowBox[{"2", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "3", "]"}], "]"}]}]}], " ", ",", RowBox[{"3", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "4", "]"}], "]"}]}]}], ",", RowBox[{"4", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "5", "]"}], "]"}]}]}], ",", RowBox[{ RowBox[{"-", "4"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "6", "]"}], "]"}]}]}], ",", RowBox[{ RowBox[{"-", "3"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "7", "]"}], "]"}]}]}], " ", ",", RowBox[{ RowBox[{"-", "2"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "8", "]"}], "]"}]}]}], " ", ",", RowBox[{ RowBox[{"-", "1"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "9", "]"}], "]"}]}]}]}], " ", "}"}], ",", "n"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"MAX", "=", RowBox[{"Max", "[", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "2", "]"}], "]"}], ",", " ", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "3", "]"}], "]"}], "-", RowBox[{"KR", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "4", "]"}], "]"}], "-", RowBox[{"KR", "[", RowBox[{"[", "3", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "5", "]"}], "]"}], "-", RowBox[{"KR", "[", RowBox[{"[", "4", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "6", "]"}], "]"}], "-", RowBox[{"KR", "[", RowBox[{"[", "5", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "7", "]"}], "]"}], "-", RowBox[{"KR", "[", RowBox[{"[", "6", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"KR", "[", RowBox[{"[", "8", "]"}], "]"}], "-", RowBox[{"KR", "[", RowBox[{"[", "7", "]"}], "]"}]}], ",", RowBox[{"144", "-", RowBox[{"KR", "[", RowBox[{"[", "8", "]"}], "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"MAX", "\[Equal]", RowBox[{"KR", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"N", "[", RowBox[{"1", "+", RowBox[{"w1", " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", "2"}], " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "3", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", "3"}], RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "4", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", "4"}], " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "5", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", RowBox[{"(", RowBox[{"-", "4"}], ")"}]}], " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "6", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", RowBox[{"(", RowBox[{"-", "3"}], ")"}]}], " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "7", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", RowBox[{"(", RowBox[{"-", "2"}], ")"}]}], " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "8", "]"}], "]"}]}]}], "+", RowBox[{ RowBox[{"w1", "^", RowBox[{"(", RowBox[{"-", "1"}], ")"}]}], " ", RowBox[{"w2", "^", RowBox[{"PR", "[", RowBox[{"[", "9", "]"}], "]"}]}]}]}], "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Tilea", "[", RowBox[{"[", "h", "]"}], "]"}], "=", RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"1", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ",", RowBox[{"2", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "3", "]"}], "]"}]}]}], " ", ",", RowBox[{"3", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "4", "]"}], "]"}]}]}], ",", RowBox[{"4", "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "5", "]"}], "]"}]}]}], ",", RowBox[{ RowBox[{"-", "4"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "6", "]"}], "]"}]}]}], ",", RowBox[{ RowBox[{"-", "3"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "7", "]"}], "]"}]}]}], " ", ",", RowBox[{ RowBox[{"-", "2"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "8", "]"}], "]"}]}]}], " ", ",", RowBox[{ RowBox[{"-", "1"}], "+", RowBox[{"9", RowBox[{"PR", "[", RowBox[{"[", "9", "]"}], "]"}]}]}]}], " ", "}"}], ",", "n"}], "]"}]}], ";", " ", RowBox[{"h", "=", RowBox[{"h", "+", "1"}]}]}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.432036065328125*^9, 3.432036105609375*^9}, { 3.432036225703125*^9, 3.432036245765625*^9}, {3.432036278765625*^9, 3.4320362824375*^9}, {3.432036401734375*^9, 3.43203640309375*^9}, { 3.43203646790625*^9, 3.43203652090625*^9}, {3.432036578890625*^9, 3.432036595765625*^9}, {3.4320366995625*^9, 3.43203672821875*^9}, { 3.4320367721875*^9, 3.43203684025*^9}, {3.43203696240625*^9, 3.432037049203125*^9}, {3.432037160671875*^9, 3.432037252640625*^9}, { 3.43203739378125*^9, 3.4320374811875*^9}, {3.432037581*^9, 3.43203758996875*^9}, {3.432037622109375*^9, 3.43203782784375*^9}, { 3.432038351234375*^9, 3.43203842434375*^9}, {3.43203869078125*^9, 3.43203869453125*^9}, {3.43203874775*^9, 3.43203880446875*^9}, { 3.432040595984375*^9, 3.432040619921875*^9}, {3.43204067653125*^9, 3.432040684140625*^9}, {3.4320407315625*^9, 3.43204088075*^9}, { 3.432041013078125*^9, 3.432041017421875*^9}, {3.432042652890625*^9, 3.43204267828125*^9}, {3.432097365453125*^9, 3.4320973666875*^9}, { 3.432107733640625*^9, 3.4321077346875*^9}}], Cell[BoxData[ DynamicBox[ToBoxes[{$CellContext`j, $CellContext`k, Length[$CellContext`V], $CellContext`h, Length[$CellContext`Can]}, StandardForm], ImageSizeCache->{107.75, {2., 8.}}]], "Output", CellChangeTimes->{ 3.43203843315625*^9, 3.432038703140625*^9, {3.432038792453125*^9, 3.43203880665625*^9}, 3.432040913671875*^9, 3.4320410346875*^9, 3.43204272934375*^9, 3.432097371765625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"Tilea", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tilea", "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.432106995484375*^9, 3.43210703265625*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "28", ",", "38", ",", "48", ",", "76", ",", "86", ",", "96", ",", "124", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "83", ",", "48", ",", "76", ",", "131", ",", "96", ",", "124", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "128", ",", "48", ",", "76", ",", "32", ",", "96", ",", "124", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "137", ",", "48", ",", "76", ",", "41", ",", "96", ",", "124", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "29", ",", "48", ",", "85", ",", "77", ",", "96", ",", "133", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "38", ",", "48", ",", "85", ",", "86", ",", "96", ",", "133", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "74", ",", "48", ",", "85", ",", "122", ",", "96", ",", "133", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "83", ",", "48", ",", "85", ",", "131", ",", "96", ",", "133", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "128", ",", "48", ",", "85", ",", "32", ",", "96", ",", "133", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "137", ",", "48", ",", "85", ",", "41", ",", "96", ",", "133", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "38", ",", "48", ",", "121", ",", "86", ",", "96", ",", "25", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "83", ",", "48", ",", "121", ",", "131", ",", "96", ",", "25", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "128", ",", "48", ",", "121", ",", "32", ",", "96", ",", "25", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "137", ",", "48", ",", "121", ",", "41", ",", "96", ",", "25", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "29", ",", "48", ",", "130", ",", "77", ",", "96", ",", "34", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "38", ",", "48", ",", "130", ",", "86", ",", "96", ",", "34", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "74", ",", "48", ",", "130", ",", "122", ",", "96", ",", "34", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "83", ",", "48", ",", "130", ",", "131", ",", "96", ",", "34", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "128", ",", "48", ",", "130", ",", "32", ",", "96", ",", "34", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "137", ",", "48", ",", "130", ",", "41", ",", "96", ",", "34", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "29", ",", "48", ",", "139", ",", "77", ",", "96", ",", "43", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "38", ",", "48", ",", "139", ",", "86", ",", "96", ",", "43", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "74", ",", "48", ",", "139", ",", "122", ",", "96", ",", "43", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "83", ",", "48", ",", "139", ",", "131", ",", "96", ",", "43", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "128", ",", "48", ",", "139", ",", "32", ",", "96", ",", "43", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "137", ",", "48", ",", "139", ",", "41", ",", "96", ",", "43", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "38", ",", "48", ",", "31", ",", "86", ",", "96", ",", "79", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "83", ",", "48", ",", "31", ",", "131", ",", "96", ",", "79", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "128", ",", "48", ",", "31", ",", "32", ",", "96", ",", "79", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "137", ",", "48", ",", "31", ",", "41", ",", "96", ",", "79", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "29", ",", "48", ",", "40", ",", "77", ",", "96", ",", "88", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "38", ",", "48", ",", "40", ",", "86", ",", "96", ",", "88", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "74", ",", "48", ",", "40", ",", "122", ",", "96", ",", "88", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "83", ",", "48", ",", "40", ",", "131", ",", "96", ",", "88", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "128", ",", "48", ",", "40", ",", "32", ",", "96", ",", "88", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "137", ",", "48", ",", "40", ",", "41", ",", "96", ",", "88", ",", "89"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.432107037796875*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"Tilea", "=", RowBox[{"Tilea", "\[Union]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "28", ",", "29", ",", "48", ",", "76", ",", "77", ",", "96", ",", "124", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "47", ",", "48", ",", "76", ",", "95", ",", "96", ",", "124", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "74", ",", "48", ",", "76", ",", "122", ",", "96", ",", "124", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "92", ",", "48", ",", "76", ",", "140", ",", "96", ",", "124", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "47", ",", "48", ",", "85", ",", "95", ",", "96", ",", "133", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "92", ",", "48", ",", "85", ",", "140", ",", "96", ",", "133", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "29", ",", "48", ",", "94", ",", "77", ",", "96", ",", "142", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "38", ",", "48", ",", "94", ",", "86", ",", "96", ",", "142", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "47", ",", "48", ",", "94", ",", "95", ",", "96", ",", "142", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "74", ",", "48", ",", "94", ",", "122", ",", "96", ",", "142", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "83", ",", "48", ",", "94", ",", "131", ",", "96", ",", "142", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "92", ",", "48", ",", "94", ",", "140", ",", "96", ",", "142", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "128", ",", "48", ",", "94", ",", "32", ",", "96", ",", "142", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "137", ",", "48", ",", "94", ",", "41", ",", "96", ",", "142", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "29", ",", "48", ",", "121", ",", "77", ",", "96", ",", "25", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "47", ",", "48", ",", "121", ",", "95", ",", "96", ",", "25", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "74", ",", "48", ",", "121", ",", "122", ",", "96", ",", "25", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "92", ",", "48", ",", "121", ",", "140", ",", "96", ",", "25", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "47", ",", "48", ",", "130", ",", "95", ",", "96", ",", "34", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "92", ",", "48", ",", "130", ",", "140", ",", "96", ",", "34", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "47", ",", "48", ",", "139", ",", "95", ",", "96", ",", "43", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "92", ",", "48", ",", "139", ",", "140", ",", "96", ",", "43", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "29", ",", "48", ",", "31", ",", "77", ",", "96", ",", "79", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "47", ",", "48", ",", "31", ",", "95", ",", "96", ",", "79", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "74", ",", "48", ",", "31", ",", "122", ",", "96", ",", "79", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "92", ",", "48", ",", "31", ",", "140", ",", "96", ",", "79", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "47", ",", "48", ",", "40", ",", "95", ",", "96", ",", "88", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "92", ",", "48", ",", "40", ",", "140", ",", "96", ",", "88", ",", "44"}], "}"}]}], "}"}]}]}]}]], "Input", CellChangeTimes->{{3.4320619693125*^9, 3.432062008734375*^9}, { 3.432106956703125*^9, 3.432106965140625*^9}, {3.4321070518125*^9, 3.43210706053125*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "28", ",", "29", ",", "48", ",", "76", ",", "77", ",", "96", ",", "124", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "38", ",", "48", ",", "76", ",", "86", ",", "96", ",", "124", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "47", ",", "48", ",", "76", ",", "95", ",", "96", ",", "124", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "74", ",", "48", ",", "76", ",", "122", ",", "96", ",", "124", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "83", ",", "48", ",", "76", ",", "131", ",", "96", ",", "124", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "92", ",", "48", ",", "76", ",", "140", ",", "96", ",", "124", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "128", ",", "48", ",", "76", ",", "32", ",", "96", ",", "124", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "137", ",", "48", ",", "76", ",", "41", ",", "96", ",", "124", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "29", ",", "48", ",", "85", ",", "77", ",", "96", ",", "133", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "38", ",", "48", ",", "85", ",", "86", ",", "96", ",", "133", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "47", ",", "48", ",", "85", ",", "95", ",", "96", ",", "133", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "74", ",", "48", ",", "85", ",", "122", ",", "96", ",", "133", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "83", ",", "48", ",", "85", ",", "131", ",", "96", ",", "133", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "92", ",", "48", ",", "85", ",", "140", ",", "96", ",", "133", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "128", ",", "48", ",", "85", ",", "32", ",", "96", ",", "133", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "137", ",", "48", ",", "85", ",", "41", ",", "96", ",", "133", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "29", ",", "48", ",", "94", ",", "77", ",", "96", ",", "142", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "38", ",", "48", ",", "94", ",", "86", ",", "96", ",", "142", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "47", ",", "48", ",", "94", ",", "95", ",", "96", ",", "142", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "74", ",", "48", ",", "94", ",", "122", ",", "96", ",", "142", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "83", ",", "48", ",", "94", ",", "131", ",", "96", ",", "142", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "92", ",", "48", ",", "94", ",", "140", ",", "96", ",", "142", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "128", ",", "48", ",", "94", ",", "32", ",", "96", ",", "142", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "137", ",", "48", ",", "94", ",", "41", ",", "96", ",", "142", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "29", ",", "48", ",", "121", ",", "77", ",", "96", ",", "25", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "38", ",", "48", ",", "121", ",", "86", ",", "96", ",", "25", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "47", ",", "48", ",", "121", ",", "95", ",", "96", ",", "25", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "74", ",", "48", ",", "121", ",", "122", ",", "96", ",", "25", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "83", ",", "48", ",", "121", ",", "131", ",", "96", ",", "25", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "92", ",", "48", ",", "121", ",", "140", ",", "96", ",", "25", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "128", ",", "48", ",", "121", ",", "32", ",", "96", ",", "25", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "73", ",", "137", ",", "48", ",", "121", ",", "41", ",", "96", ",", "25", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "29", ",", "48", ",", "130", ",", "77", ",", "96", ",", "34", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "38", ",", "48", ",", "130", ",", "86", ",", "96", ",", "34", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "47", ",", "48", ",", "130", ",", "95", ",", "96", ",", "34", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "74", ",", "48", ",", "130", ",", "122", ",", "96", ",", "34", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "83", ",", "48", ",", "130", ",", "131", ",", "96", ",", "34", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "92", ",", "48", ",", "130", ",", "140", ",", "96", ",", "34", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "128", ",", "48", ",", "130", ",", "32", ",", "96", ",", "34", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "82", ",", "137", ",", "48", ",", "130", ",", "41", ",", "96", ",", "34", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "29", ",", "48", ",", "139", ",", "77", ",", "96", ",", "43", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "38", ",", "48", ",", "139", ",", "86", ",", "96", ",", "43", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "47", ",", "48", ",", "139", ",", "95", ",", "96", ",", "43", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "74", ",", "48", ",", "139", ",", "122", ",", "96", ",", "43", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "83", ",", "48", ",", "139", ",", "131", ",", "96", ",", "43", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "92", ",", "48", ",", "139", ",", "140", ",", "96", ",", "43", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "128", ",", "48", ",", "139", ",", "32", ",", "96", ",", "43", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "91", ",", "137", ",", "48", ",", "139", ",", "41", ",", "96", ",", "43", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "29", ",", "48", ",", "31", ",", "77", ",", "96", ",", "79", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "38", ",", "48", ",", "31", ",", "86", ",", "96", ",", "79", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "47", ",", "48", ",", "31", ",", "95", ",", "96", ",", "79", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "74", ",", "48", ",", "31", ",", "122", ",", "96", ",", "79", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "83", ",", "48", ",", "31", ",", "131", ",", "96", ",", "79", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "92", ",", "48", ",", "31", ",", "140", ",", "96", ",", "79", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "128", ",", "48", ",", "31", ",", "32", ",", "96", ",", "79", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "127", ",", "137", ",", "48", ",", "31", ",", "41", ",", "96", ",", "79", ",", "89"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "29", ",", "48", ",", "40", ",", "77", ",", "96", ",", "88", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "38", ",", "48", ",", "40", ",", "86", ",", "96", ",", "88", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "47", ",", "48", ",", "40", ",", "95", ",", "96", ",", "88", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "74", ",", "48", ",", "40", ",", "122", ",", "96", ",", "88", ",", "26"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "83", ",", "48", ",", "40", ",", "131", ",", "96", ",", "88", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "92", ",", "48", ",", "40", ",", "140", ",", "96", ",", "88", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "128", ",", "48", ",", "40", ",", "32", ",", "96", ",", "88", ",", "80"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "136", ",", "137", ",", "48", ",", "40", ",", "41", ",", "96", ",", "88", ",", "89"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.43206201740625*^9, 3.432107087671875*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"Length", "[", "Tilea", "]"}]}]], "Input", CellChangeTimes->{{3.43210710071875*^9, 3.43210710671875*^9}}], Cell[BoxData["64"], "Output", CellChangeTimes->{3.43210710784375*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "Tilea", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Tilea", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{ RowBox[{"Tilea", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "Tilea", "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.43210742684375*^9, 3.43210748228125*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "28", ",", "29", ",", "48", ",", "76", ",", "77", ",", "96", ",", "124", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "38", ",", "48", ",", "76", ",", "86", ",", "96", ",", "124", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "47", ",", "48", ",", "76", ",", "95", ",", "96", ",", "124", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "28", ",", "48", ",", "74", ",", "76", ",", "96", ",", "122", ",", "124"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "35", ",", "48", ",", "76", ",", "83", ",", "96", ",", "124", ",", "131"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "44", ",", "48", ",", "76", ",", "92", ",", "96", ",", "124", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "32", ",", "48", ",", "76", ",", "80", ",", "96", ",", "124", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "28", ",", "41", ",", "48", ",", "76", ",", "89", ",", "96", ",", "124", ",", "137"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "29", ",", "37", ",", "48", ",", "77", ",", "85", ",", "96", ",", "125", ",", "133"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "38", ",", "48", ",", "85", ",", "86", ",", "96", ",", "133", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "47", ",", "48", ",", "85", ",", "95", ",", "96", ",", "133", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "37", ",", "48", ",", "74", ",", "85", ",", "96", ",", "122", ",", "133"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "35", ",", "37", ",", "48", ",", "83", ",", "85", ",", "96", ",", "131", ",", "133"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "44", ",", "48", ",", "85", ",", "92", ",", "96", ",", "133", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "32", ",", "37", ",", "48", ",", "80", ",", "85", ",", "96", ",", "128", ",", "133"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "37", ",", "41", ",", "48", ",", "85", ",", "89", ",", "96", ",", "133", ",", "137"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "29", ",", "46", ",", "48", ",", "77", ",", "94", ",", "96", ",", "125", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "38", ",", "46", ",", "48", ",", "86", ",", "94", ",", "96", ",", "134", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "46", ",", "47", ",", "48", ",", "94", ",", "95", ",", "96", ",", "142", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "46", ",", "48", ",", "74", ",", "94", ",", "96", ",", "122", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "35", ",", "46", ",", "48", ",", "83", ",", "94", ",", "96", ",", "131", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "44", ",", "46", ",", "48", ",", "92", ",", "94", ",", "96", ",", "140", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "32", ",", "46", ",", "48", ",", "80", ",", "94", ",", "96", ",", "128", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "41", ",", "46", ",", "48", ",", "89", ",", "94", ",", "96", ",", "137", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "29", ",", "48", ",", "73", ",", "77", ",", "96", ",", "121", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "38", ",", "48", ",", "73", ",", "86", ",", "96", ",", "121", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "47", ",", "48", ",", "73", ",", "95", ",", "96", ",", "121", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "26", ",", "48", ",", "73", ",", "74", ",", "96", ",", "121", ",", "122"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "35", ",", "48", ",", "73", ",", "83", ",", "96", ",", "121", ",", "131"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "44", ",", "48", ",", "73", ",", "92", ",", "96", ",", "121", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "32", ",", "48", ",", "73", ",", "80", ",", "96", ",", "121", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "25", ",", "41", ",", "48", ",", "73", ",", "89", ",", "96", ",", "121", ",", "137"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "29", ",", "34", ",", "48", ",", "77", ",", "82", ",", "96", ",", "125", ",", "130"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "34", ",", "38", ",", "48", ",", "82", ",", "86", ",", "96", ",", "130", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "34", ",", "47", ",", "48", ",", "82", ",", "95", ",", "96", ",", "130", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "34", ",", "48", ",", "74", ",", "82", ",", "96", ",", "122", ",", "130"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "34", ",", "35", ",", "48", ",", "82", ",", "83", ",", "96", ",", "130", ",", "131"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "34", ",", "44", ",", "48", ",", "82", ",", "92", ",", "96", ",", "130", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "32", ",", "34", ",", "48", ",", "80", ",", "82", ",", "96", ",", "128", ",", "130"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "34", ",", "41", ",", "48", ",", "82", ",", "89", ",", "96", ",", "130", ",", "137"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "29", ",", "43", ",", "48", ",", "77", ",", "91", ",", "96", ",", "125", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "38", ",", "43", ",", "48", ",", "86", ",", "91", ",", "96", ",", "134", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "43", ",", "47", ",", "48", ",", "91", ",", "95", ",", "96", ",", "139", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "43", ",", "48", ",", "74", ",", "91", ",", "96", ",", "122", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "35", ",", "43", ",", "48", ",", "83", ",", "91", ",", "96", ",", "131", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "43", ",", "44", ",", "48", ",", "91", ",", "92", ",", "96", ",", "139", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "32", ",", "43", ",", "48", ",", "80", ",", "91", ",", "96", ",", "128", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "41", ",", "43", ",", "48", ",", "89", ",", "91", ",", "96", ",", "137", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "29", ",", "31", ",", "48", ",", "77", ",", "79", ",", "96", ",", "125", ",", "127"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "31", ",", "38", ",", "48", ",", "79", ",", "86", ",", "96", ",", "127", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "31", ",", "47", ",", "48", ",", "79", ",", "95", ",", "96", ",", "127", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "31", ",", "48", ",", "74", ",", "79", ",", "96", ",", "122", ",", "127"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "31", ",", "35", ",", "48", ",", "79", ",", "83", ",", "96", ",", "127", ",", "131"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "31", ",", "44", ",", "48", ",", "79", ",", "92", ",", "96", ",", "127", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "31", ",", "32", ",", "48", ",", "79", ",", "80", ",", "96", ",", "127", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "31", ",", "41", ",", "48", ",", "79", ",", "89", ",", "96", ",", "127", ",", "137"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "29", ",", "40", ",", "48", ",", "77", ",", "88", ",", "96", ",", "125", ",", "136"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "38", ",", "40", ",", "48", ",", "86", ",", "88", ",", "96", ",", "134", ",", "136"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "40", ",", "47", ",", "48", ",", "88", ",", "95", ",", "96", ",", "136", ",", "143"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "40", ",", "48", ",", "74", ",", "88", ",", "96", ",", "122", ",", "136"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "35", ",", "40", ",", "48", ",", "83", ",", "88", ",", "96", ",", "131", ",", "136"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "40", ",", "44", ",", "48", ",", "88", ",", "92", ",", "96", ",", "136", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "32", ",", "40", ",", "48", ",", "80", ",", "88", ",", "96", ",", "128", ",", "136"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "40", ",", "41", ",", "48", ",", "88", ",", "89", ",", "96", ",", "136", ",", "137"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.432107483765625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"n", "=", "144"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", "Tilea"}], ";"}], "\[IndentingNewLine]", RowBox[{ 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[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "Tile", "]"}], "\[IndentingNewLine]", RowBox[{"Tile", "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{ 3.432107150328125*^9, {3.432107184671875*^9, 3.432107208109375*^9}, 3.43210725271875*^9}], Cell[BoxData["0"], "Output", CellChangeTimes->{3.4321072123125*^9, 3.432107254984375*^9, 3.4321074958125*^9}], Cell[BoxData[ RowBox[{"{", "}"}]], "Output", CellChangeTimes->{3.4321072123125*^9, 3.432107254984375*^9, 3.432107495828125*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"j1", ",", "j2", ",", "k1", ",", "k2", ",", "h"}], "}"}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "48"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"w", "=", RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", RowBox[{"Pi", " ", "/", "48"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"tile", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", " ", "100000"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"h", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j1", "=", "0"}], ",", RowBox[{"j1", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j2", "=", "j1"}], ",", RowBox[{"j2", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k1", "=", "0"}], ",", " ", RowBox[{"k1", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k2", "=", "k1"}], ",", " ", RowBox[{"k2", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k3", "=", "k2"}], ",", RowBox[{"k3", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m1", "=", "0"}], ",", " ", RowBox[{"m1", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m2", "=", "m1"}], ",", RowBox[{"m2", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m3", "=", "m2"}], ",", RowBox[{"m3", "\[LessEqual]", "15"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"P", "=", RowBox[{"{", RowBox[{"0", ",", RowBox[{"3", "j1"}], ",", " ", RowBox[{"3", "j2"}], ",", " ", RowBox[{ RowBox[{"3", "k1"}], "+", "1"}], ",", " ", RowBox[{ RowBox[{"3", "k2"}], "+", "1"}], ",", " ", RowBox[{ RowBox[{"3", "k3"}], "+", "1"}], ",", " ", RowBox[{ RowBox[{"3", "m1"}], "+", "2"}], ",", " ", RowBox[{ RowBox[{"3", "m2"}], "+", "2"}], ",", " ", RowBox[{ RowBox[{"3", "m3"}], "+", "2"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"N", "[", RowBox[{"1", "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "2", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "3", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "4", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "5", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "6", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "7", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "8", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "9", "]"}], "]"}]}]}], "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"tile", "[", RowBox[{"[", "h", "]"}], "]"}], "=", "P"}], ";", RowBox[{"h", "=", RowBox[{"h", "+", "1"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m3", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m1", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k3", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k1", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j1", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "Input",\ CellChangeTimes->{{3.43212671178125*^9, 3.432127221921875*^9}, { 3.432127267203125*^9, 3.432127409109375*^9}, {3.432127610953125*^9, 3.43212761184375*^9}, {3.432127644546875*^9, 3.432127647171875*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tile", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"tile", "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.432139807171875*^9, 3.432139855078125*^9}}], Cell[BoxData[ InterpretationBox[ StyleBox[ PanelBox[ TagBox[GridBox[{ { StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], StandardForm], ImageSizeCache->{319., {2., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None]}, { ItemBox[ TagBox[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "0", ",", "0", ",", "16", ",", "16", ",", "16", ",", "32", ",", "32", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "3", ",", "16", ",", "16", ",", "19", ",", "32", ",", "32", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "6", ",", "16", ",", "16", ",", "22", ",", "32", ",", "32", ",", "38"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "9", ",", "16", ",", "16", ",", "25", ",", "32", ",", "32", ",", "41"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "12", ",", "16", ",", "16", ",", "28", ",", "32", ",", "32", ",", "44"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "15", ",", "16", ",", "16", ",", "31", ",", "32", ",", "32", ",", "47"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "18", ",", "16", ",", "16", ",", "34", ",", "2", ",", "32", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "21", ",", "16", ",", "16", ",", "37", ",", "5", ",", "32", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "0", ",", "24", ",", "1", ",", "16", ",", "25", ",", "2", ",", "26", ",", "32"}], "}"}], ",", RowBox[{"\[LeftSkeleton]", "1568", "\[RightSkeleton]"}], ",", RowBox[{"{", RowBox[{ "0", ",", "36", ",", "42", ",", "4", ",", "10", ",", "16", ",", "20", ",", "26", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "36", ",", "45", ",", "4", ",", "13", ",", "16", ",", "20", ",", "29", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "39", ",", "39", ",", "7", ",", "7", ",", "16", ",", "23", ",", "23", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "39", ",", "42", ",", "7", ",", "10", ",", "16", ",", "23", ",", "26", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "39", ",", "45", ",", "7", ",", "13", ",", "16", ",", "23", ",", "29", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "42", ",", "42", ",", "10", ",", "10", ",", "16", ",", "26", ",", "26", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "42", ",", "45", ",", "10", ",", "13", ",", "16", ",", "26", ",", "29", ",", "32"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "45", ",", "45", ",", "13", ",", "13", ",", "16", ",", "29", ",", "29", ",", "32"}], "}"}]}], "}"}], Short[#, 5]& ], Background->GrayLevel[1], BaseStyle->{Deployed -> False}, Frame->True, FrameStyle->GrayLevel[0, 0.2], StripOnInput->False]}, { RowBox[{ ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm], ImageSizeCache->{58., {1., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>OutputSizeLimit`ButtonFunction[ Identity, 85, 22492639430091029359, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], "\[ThinSpace]", ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{62., {1., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>OutputSizeLimit`ButtonFunction[ Identity, 85, 22492639430091029359, 5 2], Enabled->True, Evaluator->Automatic, Method->"Queued"], "\[ThinSpace]", ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm], ImageSizeCache->{96., {2., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>OutputSizeLimit`ButtonFunction[ Identity, 85, 22492639430091029359, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], "\[ThinSpace]", ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{85., {1., 9.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>FrontEndExecute[{ FrontEnd`SetOptions[ FrontEnd`$FrontEnd, FrontEnd`PreferencesSettings -> {"Page" -> "Evaluation"}], FrontEnd`FrontEndToken["PreferencesDialog"]}], Evaluator->None, Method->"Preemptive"]}]} }, ColumnsEqual->False, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxDividers->{ "Columns" -> {{False}}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[1.2]}, Offset[0.2]}, "RowsIndexed" -> {}}, RowsEqual->False], "Column"], DefaultBaseStyle->{}, FrameMargins->5], Deployed->True, StripOnInput->False], Out[85]]], "Output", CellChangeTimes->{ 3.43212743834375*^9, {3.432127624578125*^9, 3.432127648421875*^9}, 3.432139812828125*^9, 3.432139856578125*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"Length", "[", "tile", "]"}]}]], "Input", CellChangeTimes->{{3.432139897609375*^9, 3.432139904953125*^9}}], Cell[BoxData["1585"], "Output", CellChangeTimes->{3.432139906140625*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{"i", ",", "j1", ",", "j2", ",", "k1", ",", "h"}], "}"}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"TILE", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "150000"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"h", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "tile", "]"}]}], ",", RowBox[{ RowBox[{"P", "=", RowBox[{"tile", "[", RowBox[{"[", "i", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j1", "=", "0"}], ",", RowBox[{"j1", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j2", "=", "0"}], ",", RowBox[{"j2", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"48", "j1"}], "+", RowBox[{"P", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"48", "j2"}], "+", RowBox[{"P", "[", RowBox[{"[", "3", "]"}], "]"}]}]}], "}"}], ",", "9"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}], "\[Equal]", RowBox[{"{", RowBox[{"3", ",", "6"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"k1", "=", "0"}], ",", RowBox[{"k1", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k2", "=", "0"}], ",", RowBox[{"k2", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k3", "=", "0"}], ",", RowBox[{"k3", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"48", "k1"}], "+", RowBox[{"P", "[", RowBox[{"[", "4", "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"48", "k2"}], "+", RowBox[{"P", "[", RowBox[{"[", "5", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"48", "k3"}], "+", RowBox[{"P", "[", RowBox[{"[", "6", "]"}], "]"}]}]}], "}"}], ",", "9"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}], "\[Equal]", RowBox[{"{", RowBox[{"1", ",", "4", ",", "7"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"m1", "=", "0"}], ",", RowBox[{"m1", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m2", "=", "0"}], ",", RowBox[{"m2", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m3", "=", "0"}], ",", RowBox[{"m3", "\[LessEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"48", "m1"}], "+", RowBox[{"P", "[", RowBox[{"[", "7", "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"48", "m2"}], "+", RowBox[{"P", "[", RowBox[{"[", "8", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"48", "m3"}], "+", RowBox[{"P", "[", RowBox[{"[", "9", "]"}], "]"}]}]}], "}"}], ",", "9"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}], "\[Equal]", RowBox[{"{", RowBox[{"2", ",", "5", ",", "8"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TILE", "[", RowBox[{"[", "h", "]"}], "]"}], "=", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{ RowBox[{"48", "j1"}], "+", RowBox[{"P", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"48", "j2"}], "+", RowBox[{"P", "[", RowBox[{"[", "3", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"48", "k1"}], "+", RowBox[{"P", "[", RowBox[{"[", "4", "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"48", "k2"}], "+", RowBox[{"P", "[", RowBox[{"[", "5", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"48", "k3"}], "+", RowBox[{"P", "[", RowBox[{"[", "6", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"48", "m1"}], "+", RowBox[{"P", "[", RowBox[{"[", "7", "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"48", "m2"}], "+", RowBox[{"P", "[", RowBox[{"[", "8", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"48", "m3"}], "+", RowBox[{"P", "[", RowBox[{"[", "9", "]"}], "]"}]}]}], "}"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", RowBox[{"h", "=", RowBox[{"h", "+", "1"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m3", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"m1", "++"}]}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k3", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k1", "++"}]}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j2", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j1", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.432139971921875*^9, 3.432140136046875*^9}, { 3.432140166578125*^9, 3.432140624734375*^9}, {3.432140656625*^9, 3.43214079396875*^9}, {3.4321408293125*^9, 3.432140829484375*^9}, { 3.432140874328125*^9, 3.432140874484375*^9}}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`i, $CellContext`j1, $CellContext`j2, $CellContext`k1, \ $CellContext`h}, StandardForm], ImageSizeCache->{128.75, {2., 8.}}]], "Output", CellChangeTimes->{ 3.432140802171875*^9, {3.43214084784375*^9, 3.43214087603125*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"TILE", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"TILE", "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "TILE", "]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.432140900765625*^9, 3.43214097575*^9}}], Cell[BoxData["97552"], "Output", CellChangeTimes->{3.432140955046875*^9, 3.43214098809375*^9}] }, Open ]], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"TILE", "[", RowBox[{"[", "23", "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.43214099959375*^9, 3.432141004984375*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"P", "=", RowBox[{"{", RowBox[{ "0", ",", "1", ",", "2", ",", "5", ",", "26", ",", "69", ",", "120", ",", "121", ",", "133"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Chop", "[", RowBox[{"N", "[", RowBox[{"1", "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "2", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "3", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "4", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "5", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "6", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "7", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "8", "]"}], "]"}]}], "+", RowBox[{"w", "^", RowBox[{"P", "[", RowBox[{"[", "9", "]"}], "]"}]}]}], "]"}], "]"}], "\[Equal]", "0"}]}], "Input", CellChangeTimes->{{3.4321410069375*^9, 3.43214105246875*^9}}], Cell[BoxData["True"], "Output", CellChangeTimes->{3.43214105409375*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"Dynamic", "[", RowBox[{"{", "j", "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "144"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Tile", "=", "TILE"}], ";"}], "\[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[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Length", "[", "Tile", "]"}], "\[IndentingNewLine]", "Tile", "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.432141121046875*^9, 3.432141129953125*^9}, { 3.432141207703125*^9, 3.4321412225*^9}}], Cell[BoxData[ DynamicBox[ToBoxes[{$CellContext`j}, StandardForm], ImageSizeCache->{21., {2., 8.}}]], "Output", CellChangeTimes->{{3.4321411996875*^9, 3.43214122421875*^9}}], Cell[BoxData["10839"], "Output", CellChangeTimes->{3.4321411996875*^9, 3.432144378609375*^9}], Cell[BoxData[ InterpretationBox[ StyleBox[ PanelBox[ TagBox[GridBox[{ { StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], StandardForm], ImageSizeCache->{319., {2., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None]}, { ItemBox[ TagBox[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "17", ",", "33", ",", "50", ",", "66", ",", "82", ",", "97", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "19", ",", "35", ",", "51", ",", "70", ",", "86", ",", "102", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "20", ",", "34", ",", "50", ",", "66", ",", "80", ",", "100", ",", "112", ",", "132"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "21", ",", "33", ",", "53", ",", "64", ",", "85", ",", "97", ",", "113", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "21", ",", "37", ",", "52", ",", "68", ",", "80", ",", "101", ",", "112", ",", "132"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "21", ",", "42", ",", "58", ",", "64", ",", "80", ",", "101", ",", "122", ",", "133"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "22", ",", "32", ",", "51", ",", "64", ",", "83", ",", "102", ",", "115", ",", "134"}], "}"}], ",", RowBox[{"\[LeftSkeleton]", "10825", "\[RightSkeleton]"}], ",", RowBox[{"{", RowBox[{ "0", ",", "107", ",", "109", ",", "112", ",", "114", ",", "128", ",", "131", ",", "133", ",", "138"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "107", ",", "109", ",", "113", ",", "120", ",", "123", ",", "133", ",", "137", ",", "139"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "107", ",", "112", ",", "114", ",", "118", ",", "128", ",", "131", ",", "138", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "107", ",", "113", ",", "118", ",", "120", ",", "123", ",", "137", ",", "139", ",", "142"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "109", ",", "112", ",", "114", ",", "116", ",", "128", ",", "133", ",", "138", ",", "140"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "109", ",", "113", ",", "115", ",", "120", ",", "125", ",", "137", ",", "139", ",", "141"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "112", ",", "114", ",", "116", ",", "118", ",", "128", ",", "138", ",", "140", ",", "142"}], "}"}]}], "}"}], Short[#, 5]& ], Background->GrayLevel[1], BaseStyle->{Deployed -> False}, Frame->True, FrameStyle->GrayLevel[0, 0.2], StripOnInput->False]}, { RowBox[{ ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm], ImageSizeCache->{58., {1., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>OutputSizeLimit`ButtonFunction[ Identity, 118, 22492639430091029359, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], "\[ThinSpace]", ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{62., {1., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>OutputSizeLimit`ButtonFunction[ Identity, 118, 22492639430091029359, 5 2], Enabled->True, Evaluator->Automatic, Method->"Queued"], "\[ThinSpace]", ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm], ImageSizeCache->{96., {2., 10.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>OutputSizeLimit`ButtonFunction[ Identity, 118, 22492639430091029359, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], "\[ThinSpace]", ButtonBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{85., {1., 9.}}], StripOnInput->False, DynamicUpdating->True], "Panel", StripOnInput->False, FontSize->1 + Inherited, Background->None], Appearance->Automatic, ButtonFrame->"DialogBox", ButtonFunction:>FrontEndExecute[{ FrontEnd`SetOptions[ FrontEnd`$FrontEnd, FrontEnd`PreferencesSettings -> {"Page" -> "Evaluation"}], FrontEnd`FrontEndToken["PreferencesDialog"]}], Evaluator->None, Method->"Preemptive"]}]} }, ColumnsEqual->False, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxDividers->{ "Columns" -> {{False}}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[1.2]}, Offset[0.2]}, "RowsIndexed" -> {}}, RowsEqual->False], "Column"], DefaultBaseStyle->{}, FrameMargins->5], Deployed->True, StripOnInput->False], Out[118]]], "Output", CellChangeTimes->{3.4321411996875*^9, 3.432144378953125*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", " ", "\[IndentingNewLine]", RowBox[{ 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", "&"}], ",", "100"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MT", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "100"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[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[{ RowBox[{"MF", "[", RowBox[{"[", "1", "]"}], "]"}], "=", RowBox[{"H", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"MT", "[", RowBox[{"[", "1", "]"}], "]"}], "=", RowBox[{"T2", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"cont", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"v", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", " ", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "T2", "]"}]}], ",", " ", RowBox[{ RowBox[{"cont", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"c", "=", "1"}], ",", RowBox[{"c", "\[LessEqual]", "v"}], ",", "\[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[{"[", "c", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "==", RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], ")"}], "\[And]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"MF", "[", RowBox[{"[", "c", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}], "\[Or]", RowBox[{ RowBox[{ RowBox[{"Chop", "[", RowBox[{"Fourier", "[", RowBox[{"H", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "\[Equal]", "0"}]}], ")"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"k", "=", "145"}], ";", RowBox[{"cont", "=", RowBox[{"cont", "+", "1"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"c", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"cont", "\[Equal]", RowBox[{"v", "+", "1"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"MF", "[", RowBox[{"[", RowBox[{"v", "+", "1"}], "]"}], "]"}], "=", RowBox[{"H", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"MT", "[", RowBox[{"[", RowBox[{"v", "+", "1"}], "]"}], "]"}], "=", RowBox[{"T2", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"v", "=", RowBox[{"v", "+", "1"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 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]", "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.432143232921875*^9, 3.43214329828125*^9}, 3.43214345428125*^9}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`j, $CellContext`v, $CellContext`vvv, \ $CellContext`vvvv}, StandardForm], ImageSizeCache->{124.5625, {2., 8.}}]], "Output", CellChangeTimes->{3.432144394609375*^9}], Cell[BoxData["10839"], "Output", CellChangeTimes->{3.432144394765625*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "17", ",", "33", ",", "50", ",", "66", ",", "82", ",", "97", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "20", ",", "34", ",", "50", ",", "66", ",", "80", ",", "100", ",", "112", ",", "132"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "23", ",", "42", ",", "47", ",", "66", ",", "80", ",", "100", ",", "112", ",", "124"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "32", ",", "52", ",", "56", ",", "76", ",", "93", ",", "109", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "34", ",", "47", ",", "58", ",", "80", ",", "104", ",", "111", ",", "127"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "34", ",", "58", ",", "68", ",", "92", ",", "102", ",", "118", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "40", ",", "52", ",", "64", ",", "84", ",", "104", ",", "116", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "44", ",", "48", ",", "64", ",", "68", ",", "88", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "48", ",", "64", ",", "80", ",", "88", ",", "104", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "32", ",", "42", ",", "56", ",", "76", ",", "100", ",", "106", ",", "120"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.43214552996875*^9}], Cell[BoxData["10"], "Output", CellChangeTimes->{3.43214552996875*^9}] }, Open ]], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"J", "=", "MF"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F1", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Length", "[", "J", "]"}], ",", "144"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "<=", RowBox[{"Length", "[", "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[{"J", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"F1", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", "0"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"F1", ";"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.43214332509375*^9, 3.432143332421875*^9}, 3.43214344478125*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FF1", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Length", "[", "F1", "]"}], ",", "144"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "F1", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "144"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"F1", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "\[Equal]", "0"}], ",", " ", RowBox[{ RowBox[{"FF1", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", "j"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "FF1", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FF1", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{ RowBox[{"FF1", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"FF1", ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"FF", "=", RowBox[{"FF1", "-", "1"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", RowBox[{"Length", "[", "FF1", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"FF1", "[", 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[{"FF", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "FF", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FF", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{ RowBox[{"FF", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "FF", "\[IndentingNewLine]", "\[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.432143335859375*^9, 3.432143357828125*^9}, 3.432143438453125*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{ "2", ",", "3", ",", "4", ",", "6", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{ "3", ",", "4", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{ "3", ",", "4", ",", "6", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "16", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{ "3", ",", "6", ",", "8", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "6", ",", "12", ",", "16", ",", "24", ",", "48"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.432145775609375*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"48", ",", "18", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ "72", ",", "48", ",", "36", ",", "24", ",", "18", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ "48", ",", "36", ",", "18", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ "48", ",", "36", ",", "24", ",", "18", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"48", ",", "18", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"48", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"48", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"48", ",", "9", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ "48", ",", "24", ",", "18", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"48", ",", "24", ",", "12", ",", "9", ",", "6", ",", "3"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.432145775671875*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "24", ",", "36", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "24", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "12", ",", "16", ",", "24", ",", "36", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "12", ",", "16", ",", "18", ",", "24", ",", "36", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "18", ",", "24", ",", "36", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "6", ",", "8", ",", "12", ",", "16", ",", "18", ",", "24", ",", "36", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "36", ",", "72", ",", "144"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "4", ",", "8", ",", "16", ",", "18", ",", "36", ",", "72", ",", "144"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.4321457756875*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"Dynamic", "[", RowBox[{"{", RowBox[{ "jj", ",", "j", ",", "i", ",", "g", ",", " ", "mark", ",", " ", "rr"}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "n", ",", "J", ",", "B", ",", "R", ",", "Tile", ",", "A", ",", "U", ",", "mark", ",", "T", ",", "g", ",", "x"}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "144"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"J", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0", ",", "17", ",", "33", ",", "50", ",", "66", ",", "82", ",", "97", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "20", ",", "34", ",", "50", ",", "66", ",", "80", ",", "100", ",", "112", ",", "132"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "23", ",", "42", ",", "47", ",", "66", ",", "80", ",", "100", ",", "112", ",", "124"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "32", ",", "52", ",", "56", ",", "76", ",", "93", ",", "109", ",", "125"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "34", ",", "47", ",", "58", ",", "80", ",", "104", ",", "111", ",", "127"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "34", ",", "58", ",", "68", ",", "92", ",", "102", ",", "118", ",", "134"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "40", ",", "52", ",", "64", ",", "84", ",", "104", ",", "116", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "44", ",", "48", ",", "64", ",", "68", ",", "88", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "24", ",", "48", ",", "64", ",", "80", ",", "88", ",", "104", ",", "112", ",", "128"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "26", ",", "32", ",", "42", ",", "56", ",", "76", ",", "100", ",", "106", ",", "120"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rr", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gcd", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Length", "[", "J", "]"}], ",", RowBox[{"Length", "[", RowBox[{"J", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"kk", "=", "1"}], ",", RowBox[{"kk", "\[LessEqual]", RowBox[{"Length", "[", "J", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"mm", "=", "2"}], ",", RowBox[{"mm", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"J", "[", RowBox[{"[", "kk", "]"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"gcd", "[", RowBox[{"[", RowBox[{"kk", ",", "mm"}], "]"}], "]"}], "=", RowBox[{"GCD", "[", RowBox[{ RowBox[{"gcd", "[", RowBox[{"[", RowBox[{"kk", ",", RowBox[{"mm", "-", "1"}]}], "]"}], "]"}], ",", RowBox[{"J", "[", RowBox[{"[", RowBox[{"kk", ",", "mm"}], "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"mm", "++"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"kk", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"kk", "=", "1"}], ",", RowBox[{"kk", "\[LessEqual]", RowBox[{"Length", "[", "J", "]"}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"gcd", "[", RowBox[{"[", RowBox[{"kk", ",", RowBox[{"Length", "[", RowBox[{"J", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], "]"}], "=", RowBox[{"GCD", "[", RowBox[{ RowBox[{"gcd", "[", RowBox[{"[", RowBox[{"kk", ",", RowBox[{"Length", "[", RowBox[{"J", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], "]"}], ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"kk", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"maxperiod", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Length", "[", "J", "]"}], ",", "10000"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nonperiodic", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"Length", "[", "J", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"jj", "=", "1"}], ",", " ", RowBox[{"jj", "\[LessEqual]", RowBox[{"Length", "[", "J", "]"}]}], ",", RowBox[{ RowBox[{"Clear", "[", RowBox[{ "B", ",", "R", ",", "Tile", ",", "A", ",", "U", ",", "mark", ",", "T", ",", "g", ",", "x"}], "]"}], ";", RowBox[{"n", "=", "144"}], ";", RowBox[{"n", "=", RowBox[{"n", "/", RowBox[{"gcd", "[", RowBox[{"[", RowBox[{"jj", ",", " ", RowBox[{"Length", "[", RowBox[{"J", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], "]"}]}]}], ";", RowBox[{"B", "=", RowBox[{ RowBox[{"J", "[", RowBox[{"[", "jj", "]"}], "]"}], "/", RowBox[{"gcd", "[", RowBox[{"[", RowBox[{"jj", ",", RowBox[{"Length", "[", RowBox[{"J", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Tile", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "100000"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"R", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"A", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"200", "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}], ",", "n", ",", RowBox[{"Length", "[", "B", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"U", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"0", "&"}], ",", RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"U", "[", RowBox[{"[", "1", "]"}], "]"}], "=", "B"}], ";", "\[IndentingNewLine]", RowBox[{"mark", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{"1", "&"}], ",", RowBox[{ RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}], "+", "1"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"T", "=", RowBox[{"Array", "[", RowBox[{ RowBox[{ RowBox[{"{", "0", "}"}], "&"}], ",", RowBox[{"n", "/", RowBox[{"Length", "[", "B", "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"g", "=", "1"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 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[{ RowBox[{"maxperiod", "[", RowBox[{"[", RowBox[{"jj", ",", "g"}], "]"}], "]"}], "=", "99"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"ff", "=", RowBox[{ RowBox[{"Length", "[", RowBox[{"Divisors", "[", "n", "]"}], "]"}], "-", "1"}]}], ",", " ", RowBox[{"ff", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Divisors", "[", "n", "]"}], "[", RowBox[{"[", "ff", "]"}], "]"}], ")"}], "+", RowBox[{"Tile", "[", RowBox[{"[", "g", "]"}], "]"}]}], ")"}], ",", "n"}], "]"}], "\[Union]", RowBox[{"{", "}"}]}], "==", RowBox[{"Tile", "[", RowBox[{"[", "g", "]"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"Tile", "[", RowBox[{"[", "g", "]"}], "]"}], "=", "0"}], ";", RowBox[{ RowBox[{"maxperiod", "[", RowBox[{"[", RowBox[{"jj", ",", "g"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"Divisors", "[", "n", "]"}], "[", RowBox[{"[", "ff", "]"}], "]"}]}], ";", RowBox[{"ff", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"maxperiod", "[", RowBox[{"[", RowBox[{"jj", ",", "g"}], "]"}], "]"}], "\[Equal]", "99"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"nonperiodic", "[", RowBox[{"[", "jj", "]"}], "]"}], "=", RowBox[{"J", "[", RowBox[{"[", "jj", "]"}], "]"}]}], ";", RowBox[{"jj", "=", RowBox[{"jj", "+", "1"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"g", ">", "1"}], ")"}], "\[And]", RowBox[{"(", RowBox[{"Not", "[", RowBox[{ RowBox[{"maxperiod", "[", RowBox[{"[", RowBox[{"jj", ",", "g"}], "]"}], "]"}], "\[Equal]", RowBox[{"maxperiod", "[", RowBox[{"[", RowBox[{"jj", ",", RowBox[{"g", "-", "1"}]}], "]"}], "]"}]}], "]"}], ")"}]}], ",", RowBox[{ RowBox[{ RowBox[{"nonperiodic", "[", RowBox[{"[", "jj", "]"}], "]"}], "=", RowBox[{"J", "[", RowBox[{"[", "jj", "]"}], "]"}]}], ";", " ", RowBox[{"jj", "=", RowBox[{"jj", "+", "1"}]}]}]}], "]"}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"ff", "=", RowBox[{"ff", "-", "1"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", " ", 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[{"Tile", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tile", "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"Length", "[", "Tile", "]"}], "\[IndentingNewLine]", "Tile"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 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[{"Tile", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tile", "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", RowBox[{ RowBox[{"Length", "[", "Tile", "]"}], "\[Equal]", "0"}], "]"}], ",", " ", RowBox[{"rr", "=", RowBox[{"rr", "+", "1"}]}]}], "]"}], ";", "\[IndentingNewLine]", "Tile", ";", "\[IndentingNewLine]", RowBox[{"jj", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "rr", "\[IndentingNewLine]", RowBox[{ RowBox[{"nonperiodic", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"nonperiodic", "\[Union]", RowBox[{"{", "}"}]}], ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", "nonperiodic", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "maxperiod", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"maxperiod", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{ RowBox[{"maxperiod", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Union]", RowBox[{"{", "0", "}"}]}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "maxperiod", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.432143407640625*^9, 3.43214342915625*^9}, { 3.4321458699375*^9, 3.432145872203125*^9}}], Cell[BoxData[ DynamicBox[ ToBoxes[{$CellContext`jj, $CellContext`j, $CellContext`i, $CellContext`g, \ $CellContext`mark, $CellContext`rr}, StandardForm], ImageSizeCache->{256.0625, {2., 8.}}]], "Output", CellChangeTimes->{3.432145887671875*^9}], Cell[BoxData["1"], "Output", CellChangeTimes->{3.4321459015625*^9}], Cell[BoxData[ RowBox[{"{", "}"}]], "Output", CellChangeTimes->{3.4321459015625*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", "72", "}"}], ",", RowBox[{"{", "36", "}"}], ",", RowBox[{"{", "72", "}"}], ",", RowBox[{"{", "72", "}"}], ",", RowBox[{"{", "72", "}"}], ",", RowBox[{"{", "36", "}"}], ",", RowBox[{"{", "18", "}"}], ",", RowBox[{"{", "18", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", "36", "}"}]}], "}"}]], "Output", CellChangeTimes->{3.43214590159375*^9}] }, Open ]] }, WindowSize->{1005, 567}, WindowMargins->{{116, Automatic}, {Automatic, 65}}, 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, 14421, 325, 1092, "Input"], Cell[15014, 350, 541, 10, 30, "Output"], Cell[15558, 362, 400, 6, 30, "Output"], Cell[15961, 370, 384, 6, 30, "Output"], Cell[16348, 378, 388, 6, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[16773, 389, 229, 5, 52, "Input"], Cell[17005, 396, 213, 5, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17255, 406, 11037, 275, 512, "Input"], Cell[28295, 683, 412, 8, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[28744, 696, 275, 7, 52, "Input"], Cell[29022, 705, 5495, 147, 240, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[34554, 857, 4850, 120, 232, "Input"], Cell[39407, 979, 9716, 259, 430, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[49160, 1243, 163, 3, 52, "Input"], Cell[49326, 1248, 70, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[49433, 1254, 639, 17, 112, "Input"], Cell[50075, 1273, 9695, 259, 430, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[59807, 1537, 2036, 56, 252, "Input"], Cell[61846, 1595, 113, 2, 30, "Output"], Cell[61962, 1599, 132, 3, 30, "Output"] }, Open ]], Cell[62109, 1605, 5871, 139, 532, "Input"], Cell[CellGroupData[{ Cell[68005, 1748, 277, 8, 52, "Input"], Cell[68285, 1758, 7924, 207, 206, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[76246, 1970, 164, 3, 52, "Input"], Cell[76413, 1975, 73, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[76523, 1981, 8552, 204, 592, "Input"], Cell[85078, 2187, 277, 6, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[85392, 2198, 343, 9, 72, "Input"], Cell[85738, 2209, 95, 1, 30, "Output"] }, Open ]], Cell[85848, 2213, 183, 4, 52, "Input"], Cell[CellGroupData[{ Cell[86056, 2221, 1173, 36, 52, "Input"], Cell[87232, 2259, 72, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[87341, 2265, 2182, 58, 272, "Input"], Cell[89526, 2325, 176, 3, 30, "Output"], Cell[89705, 2330, 94, 1, 30, "Output"], Cell[89802, 2333, 7399, 193, 206, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[97238, 2531, 6783, 181, 872, "Input"], Cell[104024, 2714, 218, 5, 30, "Output"], Cell[104245, 2721, 74, 1, 30, "Output"], Cell[104322, 2724, 1601, 43, 88, "Output"], Cell[105926, 2769, 70, 1, 30, "Output"] }, Open ]], Cell[106011, 2773, 1738, 46, 312, "Input"], Cell[CellGroupData[{ Cell[107774, 2823, 4973, 138, 792, "Input"], Cell[112750, 2963, 1173, 33, 50, "Output"], Cell[113926, 2998, 1167, 33, 50, "Output"], Cell[115096, 3033, 1544, 42, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[116677, 3080, 26761, 670, 1752, "Input"], Cell[143441, 3752, 250, 5, 30, "Output"], Cell[143694, 3759, 68, 1, 30, "Output"], Cell[143765, 3762, 85, 2, 30, "Output"], Cell[143853, 3766, 443, 13, 30, "Output"] }, Open ]] } ] *) (* End of internal cache information *)