(* This file is a numeric proof of the fact that there is no non-periodic tiling in the hardes case {2,4,8,16},{3,9}.

But later i found the following proof by theory: 
By a theorem of Sands (see C-M paper) one of the tiles is contained in some subgroup pZ. If it is the tile of length 16, say A, then it must be contained in the subgroup {0,3,6,...} of 48 elements. Then the tiling of Z_144 is composed of 3 tilings of Z_48 in the usual manner A/3+B1/3, etc. If A/3 is periodic, there is nothing to prove. If it is not, then B1/3 must be periodic (because every tiling of Z_48 is periodic). And it is trivial that the period of B1/3 must be 16, so that B1 is periodic by 48. In the same way B2 and B3 is also periodic by 48, and so is B.

If B is contained in pZ, then it must be the subgroup {0,2,4,...}. And A+B is composed of two tilings of Z_72, B/2+A1/2 etc. The length of B is 9 so, and all tilings of Z_72 of lengths 8 and 9 are periodic. Therefore: 
- either B/2 is periodic, and we are done.
- or A1/2 is 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, and so is A. 

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 partition. 

 *)

Dynamic[{j1,j2,j3, j4, d}]

Can=Array[0&,100000];
d=1;
n=16; 
AA=Table[i,{i,-n+1,n-1}];B=N[Exp[2π I / n AA],6];
BB=Array[N[Exp[(-1)^#π I / n ],6]&,{2},{0}];
m=1;
eps=N[40 3.142/144, 6]
For[j1=0, j1≤15,
For[j2=j1, j2≤15,
For[j3=j2, j3≤15,
For[j4=j3, j4≤15,
For[j5=j4, j5≤15,
For[j6=j5, j6≤15,
For[j7=j6, j7≤15,
For[j8=j7, j8≤15,
P={0,j1,j2,j3,j4,j5,j6,j7,j8};
If[ Abs[1+B[[  P[[2]] +n]]+B[[  P[[3]]+n ]]+B[[  P[[4]]+n ]]+B[[  P[[5]]+n ]]+B[[  P[[6]]+n ]]+B[[  P[[7]]+n ]]+B[[  P[[8]]+n ]]+B[[  P[[9]]+n ]] ]<  eps,Can[[d]]=P; d=d+1];m=m+1;
j8++];
j7++];
j6++];
j5++];
j4++];
j3++];
j2++];
j1++];

Can=Drop[Can⋃{0},1];
Length[Can]
m

Can[[1]]

Dynamic[{j,k,Length[V],h, Length[Can]}]
n=144;
w1=Exp[I 2 Pi /144];
w2=Exp[I 2 Pi /16];
h=1;
Tilea=Array[0&, 100000];
For[j=1,j≤Length[Can],
P={Can[[j]]};
V=Prepend[#,0]&/@Flatten[ Permutations/@(Drop[#,1]&/@P),1]⋃{};
For[k=1,k≤Length[V], PR=V[[k]]; KR=Mod[{0,1+9PR[[2]],2+9PR[[3]] ,3+9PR[[4]],4+9PR[[5]],-4+9PR[[6]],-3+9PR[[7]] ,-2+9PR[[8]] ,-1+9PR[[9]] },n]⋃{};
MAX=Max[KR[[2]], KR[[3]]-KR[[2]],KR[[4]]-KR[[3]],KR[[5]]-KR[[4]],KR[[6]]-KR[[5]],KR[[7]]-KR[[6]],KR[[8]]-KR[[7]],144-KR[[8]]];
If[MAX==KR[[2]],
If[Chop[N[1+w1 w2^PR[[2]]+w1^2 w2^PR[[3]]+w1^3w2^PR[[4]]+w1^4 w2^PR[[5]]+w1^(-4) w2^PR[[6]]+w1^(-3) w2^PR[[7]]+w1^(-2) w2^PR[[8]]+w1^(-1) w2^PR[[9]]]]==0,
Tilea[[h]]=Mod[{0,1+9PR[[2]],2+9PR[[3]] ,3+9PR[[4]],4+9PR[[5]],-4+9PR[[6]],-3+9PR[[7]] ,-2+9PR[[8]] ,-1+9PR[[9]] },n]; h=h+1]];
k++];
j++];

Tilea=Drop[Tilea⋃{0},1]

Tilea=Tilea⋃{{0,28,29,48,76,77,96,124,125},{0,28,47,48,76,95,96,124,143},{0,28,74,48,76,122,96,124,26},{0,28,92,48,76,140,96,124,44},{0,37,47,48,85,95,96,133,143},{0,37,92,48,85,140,96,133,44},{0,46,29,48,94,77,96,142,125},{0,46,38,48,94,86,96,142,134},{0,46,47,48,94,95,96,142,143},{0,46,74,48,94,122,96,142,26},{0,46,83,48,94,131,96,142,35},{0,46,92,48,94,140,96,142,44},{0,46,128,48,94,32,96,142,80},{0,46,137,48,94,41,96,142,89},{0,73,29,48,121,77,96,25,125},{0,73,47,48,121,95,96,25,143},{0,73,74,48,121,122,96,25,26},{0,73,92,48,121,140,96,25,44},{0,82,47,48,130,95,96,34,143},{0,82,92,48,130,140,96,34,44},{0,91,47,48,139,95,96,43,143},{0,91,92,48,139,140,96,43,44},{0,127,29,48,31,77,96,79,125},{0,127,47,48,31,95,96,79,143},{0,127,74,48,31,122,96,79,26},{0,127,92,48,31,140,96,79,44},{0,136,47,48,40,95,96,88,143},{0,136,92,48,40,140,96,88,44}}

Length[Tilea]

For[j=1,j≤Length[Tilea],
Tilea[[j]]=Tilea[[j]]⋃{};
j++];
Tilea

n=144;
Tile=Tilea;
For[j=1, j≤Length[Tile], P=Tile[[j]];
For[i=2, i<=Length[P], 
If[MemberQ[Tile,Mod[P-P[[i]],n]⋃{}], Tile[[j]]=0;i=Length[P]+1];
i++];
j++]; 
Tile=Drop[Tile⋃{0},1];
Length[Tile]
Tile

Dynamic[{j1,j2,k1,k2,h}]

n=48;
w=Exp[I 2 Pi /48];
tile=Array[0&, 100000];
h=1;
For[j1=0,j1≤15,
For[j2=j1,j2≤15,
For[k1=0, k1≤15,
For[k2=k1, k2≤15,
For[k3=k2,k3≤15,
For[m1=0, m1≤15,
For[m2=m1,m2≤15,
For[m3=m2,m3≤15,
P={0,3j1, 3j2, 3k1+1, 3k2+1, 3k3+1, 3m1+2, 3m2+2, 3m3+2};
If[Chop[N[1+w^P[[2]]+w^P[[3]]+w^P[[4]]+w^P[[5]]+w^P[[6]]+w^P[[7]]+w^P[[8]]+w^P[[9]]]]==0,
tile[[h]]=P;h=h+1];
m3++];
m2++];
m1++];
k3++];
k2++];
k1++];
j2++];
j1++];

tile=Drop[tile⋃{0},1]

Length[tile]

Dynamic[{i,j1,j2,k1,h}]

TILE=Array[0&,150000];
h=1;
For[i=1,i≤Length[tile],P=tile[[i]];
For[j1=0,j1≤2,
For[j2=0,j2≤2,
If[Mod[{48j1+P[[2]], 48j2+P[[3]]},9]⋃{}=={3,6},
For[k1=0,k1≤2,
For[k2=0,k2≤2,
For[k3=0,k3≤2,
If[Mod[{48k1+P[[4]], 48k2+P[[5]],48k3+P[[6]]},9]⋃{}=={1,4,7},
For[m1=0,m1≤2,
For[m2=0,m2≤2,
For[m3=0,m3≤2,
If[Mod[{48m1+P[[7]], 48m2+P[[8]],48m3+P[[9]]},9]⋃{}=={2,5,8},
TILE[[h]]={0,48j1+P[[2]], 48j2+P[[3]],48k1+P[[4]], 48k2+P[[5]],48k3+P[[6]],48m1+P[[7]], 48m2+P[[8]],48m3+P[[9]]}⋃{};h=h+1];
m3++];
m2++];
m1++]];
k3++];
k2++];
k1++]];
j2++];
j1++];
i++];

TILE=Drop[TILE⋃{0},1];
Length[TILE]

TILE[[23]]

P={0,1,2,5,26,69,120,121,133};
Chop[N[1+w^P[[2]]+w^P[[3]]+w^P[[4]]+w^P[[5]]+w^P[[6]]+w^P[[7]]+w^P[[8]]+w^P[[9]]]]==0

Dynamic[{j}]
n=144;
Tile=TILE;
For[j=1, j≤Length[Tile], P=Tile[[j]];
For[i=2, i<=Length[P], 
If[MemberQ[Tile,Mod[P-P[[i]],n]⋃{}], Tile[[j]]=0;i=Length[P]+1];
i++];
j++]; 
Tile=Drop[Tile⋃{0},1];
Length[Tile]
Tile

Dynamic[{j,v,vvv,vvvv}]

T2=Tile;

Clear[H];

Length[T2]

H=Array[0&,{Length[T2],144}];
MF=Array[0&,100];
MT=Array[0&,100];

For[j=1, j≤Length[T2], 
For[k=1, k≤144,
If[MemberQ[T2[[j]],Mod[k,144]],H[[j,k]]=1];
k++];
j++];

MF[[1]]=H[[1]];
MT[[1]]=T2[[1]];

cont=1;
v=1;
For[j=2, j≤Length[T2], cont=1;
For[c=1,c≤v,
For[k=1, k≤144,
If[(Not[Chop[Fourier[MF[[c]]]][[k]]==Chop[Fourier[H[[j]]]][[k]]])∧(Chop[Fourier[MF[[c]]]][[k]]==0∨Chop[Fourier[H[[j]]]][[k]]==0), 
k=145;cont=cont+1];
k++];
c++];
If[cont==v+1, MF[[v+1]]=H[[j]];MT[[v+1]]=T2[[j]]; v=v+1];
j++]; 


MT=Drop[MT⋃{},1]
MF=Drop[MF⋃{},1];
Length[MF]

J=MF;
F1=Array[1&,{Length[J],144}];

For[i=1,i<=Length[J],
For[j=1,j≤144,
If[Chop[Fourier[J[[i]]]][[j]]==0, F1[[i,j]]=0];
j++];
i++];


F1;

FF1=Array[0&,{Length[F1],144}];

For[i=1,i≤Length[F1],
For[j=1,j≤144,
If[F1[[i,j]]==0, FF1[[i,j]]=j];
j++];
i++];

For[j=1,j≤Length[FF1],
FF1[[j]]=Drop[FF1[[j]]⋃{},1];
j++];
FF1;


FF=FF1-1;

For[m=1,m≤Length[FF1],
For[j=1,j≤Length[FF1[[m]]],
FF[[m,j]]=GCD[FF[[m,j]],144];
j++];
m++];
FF;
For[j=1,j≤Length[FF],
FF[[j]]=FF[[j]]⋃{};
j++];
FF

FT=144/FF
CFT=Array[0&,Length[FT]];
For[j=1,j≤Length[FT],
CFT[[j]]=Complement[Divisors[144],FT[[j]]];
j++];
CFT

Dynamic[{jj,j,i,g, mark, rr}]
Clear[n,J,B,R,Tile,A,U,mark,T,g,x];

n=144;

J={{0,17,33,50,66,82,97,112,128},{0,20,34,50,66,80,100,112,132},{0,23,42,47,66,80,100,112,124},{0,24,32,52,56,76,93,109,125},{0,24,34,47,58,80,104,111,127},{0,24,34,58,68,92,102,118,134},{0,24,40,52,64,84,104,116,128},{0,24,44,48,64,68,88,112,128},{0,24,48,64,80,88,104,112,128},{0,26,32,42,56,76,100,106,120}};
rr=1;
gcd=Array[0&,{Length[J],Length[J[[1]]]}];
For[kk=1,kk≤Length[J],
For[mm=2,mm≤Length[J[[kk]]],
gcd[[kk,mm]]=GCD[gcd[[kk,mm-1]],J[[kk,mm]]];
mm++];
kk++];
For[kk=1,kk≤Length[J], gcd[[kk,Length[J[[1]]]]]=GCD[gcd[[kk,Length[J[[1]]]]],n];
kk++];

maxperiod=Array[0&,{Length[J],10000}];
nonperiodic=Array[0&,Length[J]];

For[jj=1, jj≤Length[J],Clear[B,R,Tile,A,U,mark,T,g,x];n=144;n=n/gcd[[jj, Length[J[[1]]]]];B=J[[jj]]/gcd[[jj,Length[J[[1]]]]];

Tile=Array[0&,100000];
R=Array[0&,n];
A=Array[200&,{n/Length[B],n,Length[B]}];
U=Array[0&,n/Length[B]];
U[[1]]=B;
mark=Array[1&,n/Length[B]+1];
T=Array[{0}&,n/Length[B]];
g=1;

For[i=1, i>0,
If[Length[U[[i]]]==n,  Tile[[g]]=T[[i]]⋃{};maxperiod[[jj,g]]=99;
For[ff=Length[Divisors[n]]-1, ff>0,
If[Mod[((Divisors[n][[ff]])+Tile[[g]]),n]⋃{}==Tile[[g]],Tile[[g]]=0;maxperiod[[jj,g]]=Divisors[n][[ff]];ff=0;
If[maxperiod[[jj,g]]==99, nonperiodic[[jj]]=J[[jj]];jj=jj+1,
If[(g>1)∧(Not[maxperiod[[jj,g]]==maxperiod[[jj,g-1]]]),nonperiodic[[jj]]=J[[jj]]; jj=jj+1]]];
ff=ff-1];
 g=g+1;T[[i]]=T[[i-1]];mark[[i]]=1;A[[i]]=Array[200&,{n,Length[B]}];i=i-1,
For[j=1, j≤n,k=100;
If[Not[MemberQ[U[[i]],Mod[j,n]]], k=0;
For[m=1, m≤Length[B],
If[U[[i]]⋂ Mod[(j-B[[m]])+B,n]=={}, k=k+1; A[[i,j,m]]=Mod[j-B[[m]],n]];
m++]];
R[[j]]=k;
j++];
min=Min[R]; 
If[(Not[min==0]),
t=Catch[Do[If[R[[ii]]==min, Throw[ii]],{ii,n}]];
If[mark[[i]]≤Length[B],
For[b=mark[[i]], b<=Length[B],mark[[i]]=b+1;z=0;
If[Not[A[[i,t,b]]==200], U[[i+1]]=U[[i]]⋃Mod[A[[i,t,b]]+B,n]; T[[i+1]]=T[[i]]⋃{A[[i,t,b]]}; b=Length[B]+1;z=1;i=i+1;];
b++];
If[z==0, mark[[i]]=1;A[[i]]=Array[200&,{n,Length[B]}];i=i-1];
, mark[[i]]=1;A[[i]]=Array[200&,{n,Length[B]}];T[[i]]=T[[i-1]];i=i-1];
, mark[[i]]=1;A[[i]]=Array[200&,{n,Length[B]}];T[[i]]=T[[i-1]];i=i-1];
];
];

Tile=Drop[Tile⋃{0},1];
Length[Tile]
Tile;

For[j=1, j≤Length[Tile], P=Tile[[j]];
For[i=2, i<=Length[P], 
If[MemberQ[Tile,Mod[P-P[[i]],n]⋃{}], Tile[[j]]=0;i=Length[P]+1];
i++];
j++]; 
Tile=Drop[Tile⋃{0},1];
If[Not[Length[Tile]==0], rr=rr+1];
Tile;
jj++];
rr
nonperiodic=Drop[nonperiodic⋃{},1];
nonperiodic
For[j=1,j≤Length[maxperiod],maxperiod[[j]]=Drop[maxperiod[[j]]⋃{0},1];
j++];
maxperiod