Octonacci[k_]:=Module[{octo,i},
octo=Table[0,{i,1,k}];
octo[[1]]=1;
octo[[2]]=2;
Do[ octo[[i]]=octo[[i-2]]+2*octo[[i-1]],{i,3,k}];
octo];

Octonacci[10]

Susceptibilité de spin

Clear[liens,ppts,l,ll,chispin,sp];

liens=Import["liensPBC5.dat"];
ppts=Import["PtsPBC5.dat"];
l=Length[liens];
ll=Length[ppts];

cut=0.5;


RawHamFlux5=Reap[Do[{rat=N[70*Sqrt[2]];
dx=ppts[[liens[[m,1]],1]]-ppts[[liens[[m,2]],1]];
dy=ppts[[liens[[m,1]],2]]-ppts[[liens[[m,2]],2]];

If[(liens[[m,1]]<liens[[m,2]])&&(Abs[dy]<cut)&&(Abs[dx]<cut),(*Print["Cond  "," ",dx," ",dy," ",liens[[m,1]]," ",liens[[m,2]]];*)
Sow[{{liens[[m,1]],liens[[m,2]]},-Exp[I*Pi*Phi*rat*rat*((ppts[[liens[[m,2]]]])[[2]]-(ppts[[liens[[m,1]]]])[[2]])*((ppts[[liens[[m,2]]]])[[1]]+(ppts[[liens[[m,1]]]])[[1]])]}];
Sow[{{liens[[m,2]],liens[[m,1]]},-Exp[-I*Pi*Phi*rat*rat*((ppts[[liens[[m,2]]]])[[2]]-(ppts[[liens[[m,1]]]])[[2]])*((ppts[[liens[[m,2]]]])[[1]]+(ppts[[liens[[m,1]]]])[[1]])]}];]
},{m,1,l}]][[2,1]];

tmp=Split[Sort[RawHamFlux5],#1[[1]]==#2[[1]]&];
RawHamFlux5=Table[tmp[[i,1,1]]->Tr[Transpose[tmp[[i]]][[2]]],{i,1,Length[tmp]}];

ll

rulef={Phi->0.};
ham=SparseArray[RawHamFlux5/.rulef];

sp6=Eigenvalues[ham];

sp4=Eigenvalues[ham];

sp5=Eigenvalues[ham];

sp6=Import["sp6FluxNul.dat"];

Length[sp6]

liminfT=N[8/1393]

N[8/8120]

aire4=2*29^2;
mub=1;
beta=1/0.005;
chispin4[mu_]:=2*mub^2/aire4*Sum[beta/4*(Sech[beta*(sp4[[i]]-mu)/2])^2,{i,1,Length[sp4]}];

aire5=2*70^2;
mub=1;
beta=1/0.001;
chispin5[mu_]:=2*mub^2/aire5*Sum[beta/4*(Sech[beta*(sp5[[i]]-mu)/2])^2,{i,1,Length[sp5]}];

aire6=2*169^2;
mub=1;
beta=1/0.001;
chispin6[mu_]:=2*mub^2/aire6*Sum[beta/4*(Sech[beta*(sp6[[i]]-mu)/2])^2,{i,1,Length[sp6]}];

chispin[0]

Max[sp]

Min[sp]

(*** Susceptibilité de spin pour k = 3 ***)

Plot[chispin[x],{x,-4.14,4.14}]

(*** Susceptibilité de spin pour k = 4, T=0.02 ***)

Plot[chispin4[x],{x,-4.5,4.5}]

Plot[chispin4[x],{x,-0.2,4.5}]

Plot[chispin5[x],{x,-0.2,4.5}]

Plot[chispin5[x],{x,-0.2,4.5}]

Plot[chispin6[x],{x,-0.2,4.5}]

chsp6=

Show[chsp6,PlotRange->{{-0.2,4.5},{0.,0.6}}]

Plot[chispin[x],{x,-4.5,4.5}]

5

(*** Susceptibilité de spin pour k = 4, T=0.04 ***)

Plot[chispin[x],{x,-4.5,4.5},PlotRange->All]

(*** Susceptibilité de spin pour k = 4,5 ; T=0.04 ***)

Plot[{chispin[x],chispin5[x]},{x,-4.5,4.5},PlotRange->All]

t45=

Plot[chispin6[x],{x,-4.5,4.5},PlotStyle->Red,PlotRange->All]

Plot[chispin6[x],{x,-4.5,4.5},PlotStyle->Red,PlotRange->All]

t6=

Show[t6,t45]

Max[sp4]

Max[sp5]

4.218742807772224`

Max[sp6]

chispinthk4=N[1/(2*Pi*2.9)]

chispinthk7=N[1/(2*Pi*2.82)]

chispin[4.2187]

Estimation de la masse effective inverse à partir de la courbe de chispin à T=0.04

chispinthk4=N[1/(2*Pi*2.9)]

chispinthk7=N[1/(2*Pi*2.82)]

chispinnumk6=chispin6[4.221]

chispinnumk5=0.04847077737369939`;

chispinnumk4=chispin[4.205]

chispinthk5=N[1/(2*Pi*2.89)]

minvT004k5=N[1/(2*Pi*chispin[4.218742807772224`])]

(*** Susceptibilité de spin pour k = 5, T=0.0125 ***)

Plot[chispin[x],{x,-4.14,4.14}]

(*** Susceptibilité de spin pour k = 6 ***)

Plot[chispin[x],{x,-4.14,4.14}]

Susceptibilité orbitale

N[Pi/(6*47321)]

sp6Flux0to000005=Reap[
Sow[Flatten[{0,eig}]/.rulef];
For[n=1,n≤6,n++,
Print[n];
rulef={Phi->(n-1)/100000};
ham=SparseArray[RawHamFlux/.rulef];
eig=Sort[Eigenvalues[ham]];
Sow[Flatten[{(n-1)/100000,eig}]/.rulef]

(*,Method->{"Arnoldi","MaxIterations"->4000}]
res=Eigensystem[ham];
For[j=1,j≤ntot,j++,
If[Tr[((Abs[res[[2,j]]])^4)]<ϵ,Sow[Flatten[{f,Chop[res[[1,j]]]}]/.rulef]];
];*)

]][[2,1]];

Export["sp6Flux0to000005.dat",N[sp6Flux0to000005]];

ClearAll[beta,aire,Omega]

beta=1/0.04;
mub=1;
aire=2*29^2;
Omega=Reap[Do[Sow[{sp4Flux0to00015[[b,1]],-0.00125/aire*Sum[Log[1+Exp[-beta(sp4Flux0to00015[[b,n]]+mub*sp4Flux0to00015[[b,1]]-mu)]]+Log[1+Exp[-beta(sp4Flux0to00015[[b,n]]-mub*sp4Flux0to00015[[b,1]]-mu)]],{n,2,1394}]}],{b,1,16}]][[2,1]];

bet2=1/0.0125;
chispin[mu_]:=2*mub^2/aire*Sum[bet2/4*(Sech[bet2*(sp4[[i]]-mu)/2])^2,{i,1,Length[sp4]}];

beta

1/0.00125

Om0=Omega/.mu->0;

Om1=Omega/.mu->0.5;

Om1

Om0

Print[Fit[Om0,{1,x,x^2},x]]

sp4FluxAbs000005[[6,2]]

ListPlot[Transpose[{Transpose[sp4Flux0001to0002][[1]],Transpose[sp4Flux0001to0002][[4]]}],PlotRange->All]

ListPlot[Transpose[{Transpose[sp4Flux0to0002][[1]],Transpose[sp4Flux0to0002][[4]]}],PlotRange->All]

ListPlot[Transpose[{Transpose[sp4Flux0to00015][[1]],Transpose[sp4Flux0to00015][[4]]}],PlotRange->All]

Fit[Take[Om0,{4,8}],{1,x,x^2},x]

Susceptibilité orbitale en fittant Omega sur une fen^etre de flux [0,0.0004]

Do[{Omk=Omega/.mu->(k-1)*8.4/20-4.20;Print[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]},{k,1,21}];

ClearAll[chi2,ListChispin,ListChi,ListChiorb,ListChi0to00015];

ListChi0to00015=Reap[Do[{Omk=Omega/.mu->(k-1)*8.4/100-4.20;Sow[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]},{k,1,101}]][[2,1]];

ListChi

Coefficient[Fit[Omega/.mu->-4.20,{1,x,x^2},x],x,2]

Clear[ListChispin0to00015,ListChiorb0to00015]

chi0to00015=Table[{(k-1)*8.4/100-4.20,2*Coefficient[ListChi0to00015[[k]],x,2]},{k,1,101}];

ListChispin0to00015=Table[{(k-1)*8.4/100-4.20,chispin[(k-1)*8.4/100-4.20]},{k,1,101}];

ListChiorb0to00015=Table[{(k-1)*8.4/100-4.20,-chi0to00015[[k,2]]-ListChispin0to00015[[k,2]]},{k,1,101}];

ListChispin[[11]]

Dimensions[ListChiorb0to00015]

ListPlot[ListChispin0to00015]

ListLinePlot[ListChiorb0to00015,PlotRange->All](* chi orbital pour k = 4 *)

Susceptibilité orbitale en fittant Omega sur une fen^etre de flux [0,0.0015], k=4

ClearAll[ListChi0001to0002,chi0001to0002,ListChispin,ListChiorb0001to0002]

beta=1/0.04;
mub=1;
aire=2*29^2;
Omega=Reap[Do[Sow[{sp4Flux0001to0002[[b,1]],-0.00125/aire*Sum[Log[1+Exp[-beta(sp4Flux0001to0002[[b,n]]+mub*sp4Flux0001to0002[[b,1]]-mu)]]+Log[1+Exp[-beta(sp4Flux0001to0002[[b,n]]-mub*sp4Flux0001to0002[[b,1]]-mu)]],{n,2,1394}]}],{b,1,12}]][[2,1]];

Do[{Omk=Omega/.mu->(k-1)*8.4/20-4.20;Print[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]},{k,1,21}];

ListChi0001to0002=Reap[Do[{Omk=Omega/.mu->(k-1)*9.0/100-4.50;Sow[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]},{k,1,101}]][[2,1]];

chi0001to0002=Table[{(k-1)*9.0/100-4.50,2*Coefficient[ListChi0001to0002[[k]],x,2]},{k,1,101}];
ListChispin=Table[{(k-1)*9.0/100-4.50,chispin[(k-1)*9.0/100-4.50]},{k,1,101}];
ListChiorb0001to0002=Table[{(k-1)*9.0/100-4.50,-chi0001to0002[[k,2]]-ListChispin[[k,2]]},{k,1,101}];

ListLinePlot[ListChiorb0001to0002,PlotRange->{{-5,5},{-0.9,1.7}}](* chi orbital pour k = 4 *)

ListLinePlot[ListChispin,PlotRange->All](* chi orbital pour k = 4 *)

N[Pi*2.9/24]

sp[[1]]

N[1/(2.9*2*Pi)]

Susceptibilité orbitale en fittant Omega sur une fen^etre de flux [0,0.0015], k=6

Clear[aire6,beta];

sp6Flux0to000005v3=Delete[sp6Flux0to000005,1];

liens[[54]]

N[169*Sqrt[2]]*Norm[ppts[[18]]-ppts[[18779]]]

Do[{Omk=Omega/.mu->(k-1)*9.0/20-4.50;Print[Fit[Omk,{1,x,x^2},x]]},{k,1,21}];
ListChi0to000005=Reap[Do[{Omk=Omega/.mu->(k-1)*9.0/100-4.50;Sow[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]},{k,1,101}]][[2,1]];

ClearAll[ListChi0to000005,chi0to000005]

ListChi0to000005=Reap[Do[{Omk=Omega/.mu->(k-1)*9.0/100-4.50;Sow[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]},{k,1,101}]][[2,1]];
chi0to000005=Table[{(k-1)*9.0/100-4.50,2*Coefficient[ListChi0to000005[[k]],x,2]},{k,1,101}];

ListLinePlot[-chi0to000005,PlotRange->All]

ListChispin0to000005=Table[{(k-1)*9.0/100-4.50,chispin6[(k-1)*9.0/100-4.50]},{k,1,101}];
ListChiorb0to000005v2=Table[{(k-1)*9.0/100-4.50,-chi0to000005[[k,2]]-ListChispin0to000005v2[[k,2]]},{k,1,101}];

ListChispin0to000005v2=Map[Flatten,ListChispin0to000005];

Dimensions[ListChiorb0to000005]

Max[sp6]

Omk6max=Omega/.mu->4.221;Print[Fit[Omk6max,{1,x,x^2},x]]

chiorbmumax=-chispin6[4.221]-2*0.6903524105702891`

ClearAll[ListChiorbprochemumax,ListChiprochemumax,chiprochemumax,ListChispinprochemumax];

Do[{Omk=Omega/.mu->(k-1)*0.023/100+4.200;Print[Fit[Omk,{1,x,x^2},x]]},{k,1,101}];

$AbortedClear[aire6,beta];

ListChiprochemumax=Reap[Do[{Omk=Omega/.mu->(k-1)*0.023/100+4.200;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,101}]][[2,1]];

chiprochemumax=Table[{(k-1)*0.023/100+4.200,2*Coefficient[ListChiprochemumax[[k]],x,2]},{k,1,101}];
ListChiorbprochemumax=Table[{(k-1)*0.023/100+4.200,-chiprochemumax[[k,2]]-(chispin6[(k-1)*0.023/100+4.200])[[1]]},{k,1,101}];

ListLinePlot[ListChiorbprochemumax,PlotRange->All]

ListChiprochemumaxv2=Reap[Do[{Omk=Omega/.mu->(k-1)*0.2/100+4.100;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,101}]][[2,1]];
chiprochemumaxv2=Table[{(k-1)*0.2/100+4.100,2*Coefficient[ListChiprochemumaxv2[[k]],x,2]},{k,1,101}];
ListChiorbprochemumaxv2=Table[{(k-1)*0.2/100+4.100,-chiprochemumaxv2[[k,2]]-(chispin6[(k-1)*0.2/100+4.100])[[1]]},{k,1,101}];

Show[ListLinePlot[ListChiorbprochemumaxv2,PlotRange->All],ListPlot[lth]]

ListChiprochemumaxv3=Reap[Do[{Omk=Omega/.mu->(k-1)*0.2/1000+4.100;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,1001}]][[2,1]];
chiprochemumaxv3=Table[{(k-1)*0.2/1000+4.100,2*Coefficient[ListChiprochemumaxv3[[k]],x,2]},{k,1,1001}];
ListChiorbprochemumaxv3=Table[{(k-1)*0.2/1000+4.100,-chiprochemumaxv3[[k,2]]-(chispin6[(k-1)*0.2/1000+4.100])[[1]]},{k,1,1001}];

Show[ListLinePlot[ListChiorbprochemumaxv3,PlotRange->{{4.2,4.25},{-2.3,-0.5}}],ListPlot[lth]]

ListLinePlot[ListChiorbprochemumaxv3]

ListPlot[lth]

Max[sp6]

pth={4.2212178563932135`,-0.7461282552275759`};

lth={{4.2212178,N[-Pi*2.85/12]},{4.2212178,N[-Pi*2.82/12]},{4.2212178,N[-Pi*2*2.85/12]},{4.22,N[-Pi*2.85/12]},{4.23,N[-Pi*2.85/12]}};

ListLinePlot[ListChiorb0to000005v2,PlotRange->All]

Susceptibilité orbitale - calcul avec mub = 0, en fittant Omega sur une fen^etre de flux [0,0.0015], k=6

sp6Flux0to000005=Import["sp6Flux0to000005.dat"];

sp6Flux0to000005v3=Delete[sp6Flux0to000005,1];

Max[sp6Flux0to000005v3[[1]]]

N[8/47800]

Dimensions[sp6Flux0to000005v3]

ClearAll[Omegav2];

beta6=1/0.004;
aire6=2*169^2;
Omega=Reap[Do[Sow[{sp6Flux0to000005v3[[b,1]],-0.004/aire6*Sum[2*Log[1+Exp[-beta6(sp6Flux0to000005v3[[b,n]]-mu)]],{n,2,47322}]}],{b,1,6}]][[2,1]];

beta6v2=1/0.001;
aire6=2*169^2;
Omegav2=Reap[Do[Sow[{sp6Flux0to000005v3[[b,1]],-0.001/aire6*Sum[2*Log[1+Exp[-beta6v2(sp6Flux0to000005v3[[b,n]]-mu)]],{n,2,47322}]}],{b,1,6}]][[2,1]];

beta6v3=1/0.02;
aire6=2*169^2;
Omegav3=Reap[Do[Sow[{sp6Flux0to000005v3[[b,1]],-0.02/aire6*Sum[2*Log[1+Exp[-beta6v3(sp6Flux0to000005v3[[b,n]]-mu)]],{n,2,47322}]}],{b,1,6}]][[2,1]];

beta6v4=1/0.05;
aire6=2*169^2;
Omegav4=Reap[Do[Sow[{sp6Flux0to000005v3[[b,1]],-1/(beta6v4*aire6)*Sum[2*Log[1+Exp[-beta6v4(sp6Flux0to000005v3[[b,n]]-mu)]],{n,2,47322}]}],{b,1,6}]][[2,1]];

beta6v5=1/0.1;
aire6=2*169^2;
Omegav5=Reap[Do[Sow[{sp6Flux0to000005v3[[b,1]],-1/(beta6v5*aire6)*Sum[2*Log[1+Exp[-beta6v5(sp6Flux0to000005v3[[b,n]]-mu)]],{n,2,47322}]}],{b,1,6}]][[2,1]];

beta6v6=1/0.1;
aire6=2*169^2;
Omegav6=Reap[Do[Sow[{sp6Flux0to000005v3[[b,1]],-1/(beta6v6*aire6)*Sum[Log[1+Exp[-beta6v6(sp6Flux0to000005v3[[b,n]]-mu)]],{n,2,47322}]}],{b,1,6}]][[2,1]];

Om0=Omega/.mu->0.;

ListPlot[Om0]

Fit[Om0,{1,x,x^2},x]

Fit[Take[Om0,{1,3}],{1,x,x^2},x]

Om3=Omega/.mu->(3-1)*9.0/20-4.50;

ListPlot[Om3]

Fit[Om3,{1,x,x^2},x]

Fit[Take[Om3,{1,5}],{1,x,x^2},x]

Do[{Omk=Omega/.mu->(k-1)*9.0/20-4.50;Print[Fit[Take[Omk,{1,4}],{1,x,x^2},x]]},{k,1,21}];

ListChiv10=Reap[Do[{Omk=Omega/.mu->(k-1)*9.0/100-4.50;Sow[Fit[Take[Omk,{1,4}],{1,x,x^2},x]]},{k,1,101}]][[2,1]];(*T=0.004*)

chiv10=Table[{(k-1)*9.0/100-4.50,2*Coefficient[ListChiv10[[k]],x,2]},{k,1,101}];

ListLinePlot[-chiv10,PlotRange->All]

Do[{Omk=Omega/.mu->(k-1)*9.0/20-4.50;Print[Fit[Omk,{1,x,x^2},x]]},{k,1,21}];
ListChi0to000005=Reap[Do[{Omk=Omega/.mu->(k-1)*9.0/100-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,101}]][[2,1]];

chi0to000005=Table[{(k-1)*9.0/100-4.50,2*Coefficient[ListChi0to000005[[k]],x,2]},{k,1,101}];

ListLinePlot[-chi0to000005,PlotRange->{{3.5,4.3},{-20,20}}]

Do[{Omk=Omegav2/.mu->(k-1)*9.0/20-4.50;Print[Fit[Take[Omk,{1,3}],{1,x,x^2},x]]},{k,1,21}];

ClearAll[ListChiv11,chiv11]

ListChiv11=Reap[Do[{Omk=Omegav2/.mu->(k-1)*9.0/100-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,101}]][[2,1]];(*T=0.001*)

chiv11=Table[{(k-1)*9.0/100-4.50,2*Coefficient[ListChiv11[[k]],x,2]},{k,1,101}];

ListChiv12=Reap[Do[{Omk=Omegav2/.mu->(k-1)*0.13/100+4.12;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,101}]][[2,1]];(*T=0.001*)

chiv12=Table[{(k-1)*0.13/100+4.12,-2*Coefficient[ListChiv12[[k]],x,2]},{k,1,101}];

ListPlot[chiv12,PlotRange->All]

ListChiv13=Reap[Do[{Omk=Omegav3/.mu->(k-1)*9.0/200-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,201}]][[2,1]];(*T=0.02*)
chiv13=Table[{(k-1)*9.0/200-4.50,-2*Coefficient[ListChiv13[[k]],x,2]},{k,1,201}];

ListLinePlot[chiv13,PlotRange->All](* T=0.02*)

ListChiv14=Reap[Do[{Omk=Omegav3/.mu->(k-1)*9.0/1000-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,1001}]][[2,1]];(*T=0.02*)
chiv14=Table[{(k-1)*9.0/1000-4.50,-2*Coefficient[ListChiv14[[k]],x,2]},{k,1,1001}];

ListLinePlot[chiv14,PlotRange->All](*T=0.02*)

ClearAll[ListChiv15,chiv15]

ListChiv15=Reap[Do[{Omk=Omegav4/.mu->(k-1)*9.0/1000-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,1001}]][[2,1]];(*T=0.02*)
chiv15=Table[{(k-1)*9.0/1000-4.50,-2*Coefficient[ListChiv15[[k]],x,2]},{k,1,1001}];

ListChiv15[[1]]

Show[ListPlot[{{4.2212,-0.7461}},PlotRange->{{3.0,4.3},{-10.,1.}}],ListLinePlot[chiv15]](* T=0.05*)

ListLinePlot[chiv15,PlotRange->All]

ListChiv16=Reap[Do[{Omk=Omegav5/.mu->(k-1)*9.0/1000-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,1001}]][[2,1]];(*T=0.1*)
chiv16=Table[{(k-1)*9.0/1000-4.50,-2*Coefficient[ListChiv16[[k]],x,2]},{k,1,1001}];

Export["chiv17.dat",chiv17];

ListLinePlot[chiv16,PlotRange->All]

ListChiv17=Reap[Do[{Omk=Omegav6/.mu->(k-1)*9.0/1000-4.50;Sow[Fit[Omk,{1,x,x^2},x]]},{k,1,1001}]][[2,1]];(*T=0.1*)
chiv17=Table[{(k-1)*9.0/1000-4.50,-2*Coefficient[ListChiv17[[k]],x,2]},{k,1,1001}];

ListLinePlot[chiv17,PlotRange->All]

chi17va=

Comparaison spin orbital - masse effective

Max[sp4]

2*169*169

Max[sp6Flux0to000005v3[[1]]]

Omk=Omega/.mu->4.205;

Print[Fit[Take[Omk,{1,5}],{1,x,x^2},x]]

ChiorbMuEgalE0=-chispin[4.205]-2*0.017463312441793968`

ChiorbThk4=N[-Pi*2.9/12]

chispin[4.205]

N[-chispin[4.205]/3]

chiork6th=N[-Pi*2.85/12]

N[1.6*10^(-19)/(1.8*10^(-18))]