fibo[n_,va_,vb_]:=If[n==1,{va},If[n==2,{va,vb},Join[fibo[n-1,va,vb],fibo[n-2,va,vb]]]];

Length[pot]

(*** OBC ***)

pot=fibo[10,va,vb];
l=Length[pot];


RawHamOBC=Reap[Do[{
Sow[{{i,i+1},pot[[i]]}];
Sow[{{i+1,i},pot[[i]]}]
},{i,1,l}]][[2,1]];

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

sp5xv1=Monitor[Reap[
For[n=1,n≤5,n++,
rulef={kx->(n-3)*N[Pi/(6*70*Sqrt[2])],ky->0};
ham=SparseArray[RawHamBloch/.rulef];
Sow[Flatten[{(n-3)*N[Pi/(6*70*Sqrt[2])],Sort[Eigenvalues[ham,10]]}]/.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]],n];

Mat10=SparseArray[RawHamOBC/.va->10/.vb->-5];

MatrixForm[Normal[SparseArray[RawHamOBC]]]

pot

ListPlot[vep10[[3]]]

eig10=Eigenvalues[Mat10];

vep10=Eigenvectors[Mat10];

k0=3;
corrOBCaux=Monitor[Reap[Do[If[(!(eig10[[i]]==eig10[[j]])),Sow[{{i,j},Abs[vep10[[i,k0]]]^2*Abs[vep10[[j,k0]]]^2*Sin[(eig10[[i]]-eig10[[j]])*t]/(t*(eig10[[i]]-eig10[[j]]))}],Sow[{{i,j},Abs[vep10[[i,k0]]]^2*Abs[vep10[[j,k0]]]^2}]],{i,1,Length[eig10]},{j,1,Length[eig10]}]],{i,j}];

corrOBCaux

rmscarre=Sum[(k-k0)^2*Abs

(corrOBCaux)[[2,1]]

corrOBC=(1/Length[eig10])*Sum[corrOBCaux[[2,1]][[i,2]],{i,Length[corrOBCaux]}];

ListLogLogPlot[Table[(corrOBC/.t->1+n/100),{n,1,10000}]]

ListPlot[Table[(corrOBC/.t->1+n/10)*(1+n/10)^0.0039,{n,1,1000}]]

TableLog12=Table[{Log[1+n/100],Log[corrOBC/.t->1+n/10]},{n,1,1000}];

Show[Plot[5.4633661822934885` -0.003942758922765623` y,{y,0,2.5}],ListPlot[TableLog12]]

Fit[TableLog12,{1,y},y]

vep11[[1]]