Definions of the Rauzy sequence (to be run once for all)

ClearAll[R]

SetDirectory[NotebookDirectory[]];

R[-1]=0;
R[0]=1;
R[1]=1;

R[n_]:=R[n-1]+R[n-2]+R[n-3]

ClearAll[Rp,Rm]

Rp[-2]=0;
Rp[-1]=0;
Rp[0]=1;
Rp[n_]:=Rp[n-1]+Rp[n-2]+Rp[n-3]

Rm[0]=1;
Rm[-1]=1;
Rm[-2]=2;
Rm[n_]:=Rm[n-3]-Rm[n-2]-Rm[n-1]

tabRm={0,0,1,-1,0,2,-3,1,4,-8,5,7,-20,18,9,-47,56,0,-103,159,-56,-206,421,-271,-356,1048,-963,-441,2452,-2974,81};

Magic fluxes for a given θ

θ=5π/6;

t1bis=Table[{order,{-(1/(Sqrt[3]))2 Sin[θ] (Cos[θ] (tabRm[[1+order]]-(1/2) tabRm[[2+order]]+(1/2) (-tabRm[[2+order]]-tabRm[[3+order]]))+(-(1/2) (Sqrt[3]) tabRm[[2+order]]+(1/2) (Sqrt[3]) (tabRm[[2+order]]+tabRm[[3+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)+θ] (Cos[θ] (tabRm[[1+order]]-(1/2) tabRm[[2+order]]+(1/2) (-tabRm[[2+order]]-tabRm[[3+order]]))+(-(1/2) (Sqrt[3]) tabRm[[2+order]]+(1/2) (Sqrt[3]) (tabRm[[2+order]]+tabRm[[3+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)-θ] (Cos[θ] (tabRm[[1+order]]-(1/2) tabRm[[2+order]]+(1/2) (-tabRm[[2+order]]-tabRm[[3+order]]))+(-(1/2) (Sqrt[3]) tabRm[[2+order]]+(1/2) (Sqrt[3]) (tabRm[[2+order]]+tabRm[[3+order]])) Sin[θ])}},{order,1,26}];
t2bis=Table[{order,{-(1/(Sqrt[3]))2 Sin[θ] (Cos[θ] (tabRm[[2+order]]-(1/2) tabRm[[3+order]]+(1/2) (-tabRm[[3+order]]-tabRm[[4+order]]))+(-(1/2) (Sqrt[3]) tabRm[[3+order]]+(1/2) (Sqrt[3]) (tabRm[[3+order]]+tabRm[[4+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)+θ] (Cos[θ] (tabRm[[2+order]]-(1/2) tabRm[[3+order]]+(1/2) (-tabRm[[3+order]]-tabRm[[4+order]]))+(-(1/2) (Sqrt[3]) tabRm[[3+order]]+(1/2) (Sqrt[3]) (tabRm[[3+order]]+tabRm[[4+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)-θ] (Cos[θ] (tabRm[[2+order]]-(1/2) tabRm[[3+order]]+(1/2) (-tabRm[[3+order]]-tabRm[[4+order]]))+(-(1/2) (Sqrt[3]) tabRm[[3+order]]+(1/2) (Sqrt[3]) (tabRm[[3+order]]+tabRm[[4+order]])) Sin[θ])}},{order,1,26}];

GCDbis[p_,q_,r_,s_,t_,u_]:=If[GCD[p,q,r,s,t,u]==0,1,GCD[p,q,r,s,t,u]]
fbis=Table[{order,Mod[1/GCDbis[-(1/(Sqrt[3]))2 Sin[θ] (Cos[θ] (tabRm[[1+order]]-(1/2) tabRm[[2+order]]+(1/2) (-tabRm[[2+order]]-tabRm[[3+order]]))+(-(1/2) (Sqrt[3]) tabRm[[2+order]]+(1/2) (Sqrt[3]) (tabRm[[2+order]]+tabRm[[3+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)+θ] (Cos[θ] (tabRm[[1+order]]-(1/2) tabRm[[2+order]]+(1/2) (-tabRm[[2+order]]-tabRm[[3+order]]))+(-(1/2) (Sqrt[3]) tabRm[[2+order]]+(1/2) (Sqrt[3]) (tabRm[[2+order]]+tabRm[[3+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)-θ] (Cos[θ] (tabRm[[1+order]]-(1/2) tabRm[[2+order]]+(1/2) (-tabRm[[2+order]]-tabRm[[3+order]]))+(-(1/2) (Sqrt[3]) tabRm[[2+order]]+(1/2) (Sqrt[3]) (tabRm[[2+order]]+tabRm[[3+order]])) Sin[θ]),-(1/(Sqrt[3]))2 Sin[θ] (Cos[θ] (tabRm[[2+order]]-(1/2) tabRm[[3+order]]+(1/2) (-tabRm[[3+order]]-tabRm[[4+order]]))+(-(1/2) (Sqrt[3]) tabRm[[3+order]]+(1/2) (Sqrt[3]) (tabRm[[3+order]]+tabRm[[4+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)+θ] (Cos[θ] (tabRm[[2+order]]-(1/2) tabRm[[3+order]]+(1/2) (-tabRm[[3+order]]-tabRm[[4+order]]))+(-(1/2) (Sqrt[3]) tabRm[[3+order]]+(1/2) (Sqrt[3]) (tabRm[[3+order]]+tabRm[[4+order]])) Sin[θ]),(1/(Sqrt[3]))2 Cos[(π/6)-θ] (Cos[θ] (tabRm[[2+order]]-(1/2) tabRm[[3+order]]+(1/2) (-tabRm[[3+order]]-tabRm[[4+order]]))+(-(1/2) (Sqrt[3]) tabRm[[3+order]]+(1/2) (Sqrt[3]) (tabRm[[3+order]]+tabRm[[4+order]])) Sin[θ])],1]},{order,1,26}];

Do[If[fbis[[i,2]]≠0,Print[fbis[[i]]]],{i,1,Length[fbis]}]