test  :={};

test1 :={1,2,3};

test1[[1]]

cantor[n_]:=If[n==1,{0},Join[1/3*cantor[n-1],2/3+1/3*cantor[n-1]]];

a := N[Log[2]]/N[Log[3]]

a

K8 = cantor[8];

Length[K8]

rm[m_]:= Sum[2^(-7)*(K8[[j]]+2)^(-a-2*I*Pi*m/N[Log[3]]),{j,1,128}];

rm[0]

hk[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]],{m,-50,50}];

hk[0,1]

Plot[hk[2,t],{t,0,100}]

hkcompper[k_,t_]:=Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]],{m,-50,50}];

Plot[hkcompper[2,t],{t,0,100}];

LogLogPlot[hkcompper[2,t],{t,0,100}]

LogLogPlot[hkcompper[2,t],{t,1,100}]

hkdir[k_,t_] :=2^(-7)*Sum[N[Exp[-I*K8[[ep]]*t]]*(K8[[ep]])^k,{ep,1,128}];

hkdir[1,1]

Re[hk[1,1]]

Plot[Re[hkdir[2,t]],{t,0,100}]

hk2[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]],{m,0,50}];

Plot[Re[hk2[2,t]],{t,0,100}]

LogLogPlot[Re[hkdir[2,t]],{t,1,100}]

K1:= cantor[1];

Length[K1]

hkdirv2[k_,t_] :=2^(-9)*Sum[N[Exp[I*K10[[ep]]*t]]*(K10[[ep]])^k,{ep,1,512}];

K10:=cantor[10];

Length[K10]

Plot[Re[hkdirv2[2,t]],{t,0,100}]

Re[hkdirv2[2,1]]

Plot[Abs[hkdir[2,t]],{t,0,1000}]

Plot[Abs[hk2[2,t]],{t,0,1000}]

hkdirv3[k_,t_] :=2^(-7)*Sum[N[Sinc[K8[[ep]]*t]]*(K8[[ep]])^k,{ep,1,128}];

Plot[Abs[hkdirv3[2,t]],{t,0,100}]

hk3[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]],{m,-50,0}];

Plot[Abs[hk3[2,t]]*t^(a+2),{t,0,100}]

ListPlot[K8]

rk[k_,n_]:= 0.5*2^(-7)*Sum[3^(n-k)*(2+K8[[ep]])^(k-n),{ep,1,128}];
hk4[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]],{m,-10,10}]+Sum[(-1)^n/Factorial[n]*Exp[I*Pi*n/2]*t^(n)*rk[k,-n]/(1-0.5*3^(-n-k)),{n,1,2}];

hk4[2,1]

Plot[Abs[hk4[2,t]]*t^(a+2),{t,0,1}]

Plot[Abs[hkdirv2[2,t]],{t,0,100}]

hkdirv2[2,12]

DiscretePlot[Abs[hkdirv2[2,(t-1)/100]]*t^(2+a),{t,1,100}]

Plot[Abs[hkdir[2,t]]*(t)^(2+a),{t,0,400}]

f[k_,t_]:= Integrate[Exp[I*x*t]*x^k,{x,0,1/3}]+Integrate[Exp[I*x*t]*x^k,{x,2/3,1}]

f[2,t]

Plot[Abs[f[20,t]],{t,0,10}]

RSolve[{h[n]==Exp[I*n/3]*Cos[n/3]* h[n/3],h[0]==1},h,n]

RSolve[{b[n+2]==4 *b[n],b[0]==1},b,n]

RSolve[{j0[n]==0.5*(1+Exp[I*2*n/3])*j0[n/3],j0[0]==1},j0,n]

htest[t_]:=NIntegrate[Gamma[0.5+I*x]*Exp[-I*Pi*0.5*(0.5+I*x)]*t^(-0.5-I*x)/(1-0.5*3^(0.5+I*x)),{x,-1000,1000}]

htest[11]

DiscretePlot[Re[htest[t]],{t,10,20}]

hk5[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]],{m,-1,1}];

Plot[Abs[hk5[20,t]],{t,0,100}]

K9 = cantor[9];

Length[K9]

hkdirv4[k_,t_] :=2^(-8)*Sum[N[Exp[I*K9[[ep]]*t]]*(K9[[ep]])^k,{ep,1,256}];

LogLogPlot[Abs[hkdirv4[20,t]],{t,1,1000}]

lkdir[k_,s_] :=2^(-9)*Sum[(K10[[ep]])^(k-s),{ep,1,512}];

rkdir[k_,s_] :=0.5*2^(-9)*Sum[(2+K10[[ep]])^(k-s)*3^(s-k),{ep,1,512}];

rkdir[2,1]

lkdir[2,1]

0.41666243289471455*(1-0.5*3^(-1))^(-1)

N[9841/19683]

f[k_,s_]:=rkdir[k,s]*(1-0.5*3^(s-k))^(-1);

Plot[{f[2,s],lkdir[2,s]},{s,0,10}]

f[2,1]

DiscretePlot[{f[2,n],lkdir[2,n]},{n,3,7}]

mkdir2[k_,s_]:=N[Integrate[hkdir[k,t]*t^(s-1),{t,1,10000}]];
hk2dir[t_]:=2^(-7)*Sum[N[Exp[I*K8[[ep]]*t]]*(K8[[ep]])^2,{ep,1,128}];

mk2dir[s_]:=Integrate[hk2dir[xx]*xx^(s-1),{xx,0,1000}];

mk2dir[4]

mkdir2[2,10]

mkth[k_,s_]:= N[Gamma[s]*Exp[-I*Pi*s/2]*mom[k,s]];

mkth[2,3]

mk2dir[2,3]

hkdir[2,2]

N[mkth[2,3]]

lkdir[2,3]

rkdir[2,3]

f[2,3]

mkthv2[k_,s_]:=Gamma[s]*Exp[-I*Pi*s/2]*f[k,s];

mkthv2[2,3]

mkdir[2,3]

gammatest[s_]:=Integrate[t^(s-1)*Exp[I*t],{t,0,Infinity}];

N[gammatest[3]]

Gamma[3]*Exp[-I*Pi*3/2]

Integrate[t^(s-1)*Exp[I*t],t]

mkthv3[k_,s_]:= Integrate[t^(s-1)*Exp[I*t],t]*f[k,s];

mkthv3[2,1]

mkdir[2,1]

mkthv2[2,1]

Integrate[t^(s-1)*Exp[I*t],{t,0,Infinity}]

hkthv1[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-50,50}];

Plot[Abs[hkdir[2,t]],{t,0,400}]

Plot[Abs[hkthv1[2,t]],{t,0,400}]

Plot[Abs[hkdir[2,t]],{t,50,150}]

Plot[Abs[hkthv1[2,t]]*(t)^(2+a),{t,50,150}]

LogLogPlot[Abs[hkdir[1,t]],{t,1,400}]

LogLogPlot[Abs[hkthv1[2,t]],{t,50,150}]

Plot[Abs[hkdirv2[2,t]],{t,0,400}]

Plot[Abs[hkthv1[2,t]]*(t)^(2+a),{t,350,450}]

hkthv2[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-5,5}];

Plot[Abs[hkthv2[2,t]]*(t)^(2+a),{t,0,400}]

LogLogPlot[Abs[hkthv2[2,t]]*(t)^(2+a),{t,1,400}]

Plot[Abs[hkdirv4[2,t]],{t,0,400}]

LogLogPlot[Abs[hkdirv4[2,t]]*t^(a+2),{t,1,4000}]

Plot[{Abs[hkthv2[2,t]],Abs[hkdirv4[2,t]]},{t,0,400}]

hkthv3[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-10,10}];

Plot[{Abs[hkthv3[2,t]],Abs[hkdirv4[2,t]]},{t,0,400}]

hkthv4[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-20,20}];

Plot[{Abs[hkthv4[2,t]],Abs[hkdirv4[2,t]]},{t,0,400}]

hkthv5[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-27,27}];

Plot[{Abs[hkthv5[2,t]],Abs[hkdirv4[2,t]]},{t,0,400}]

Plot[{Abs[hkthv5[2,t]],Abs[hkdirv2[2,t]]},{t,0,400}]

hkthv6[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-30,5}];

Plot[{Abs[hkthv6[2,t]],Abs[hkdirv4[2,t]]},{t,0,400}]

hkthv7[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-3,20}];

Plot[{Abs[hkthv7[2,t]],Abs[hkdirv4[2,t]]},{t,0,400}]

hkthv8[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-40,2}];

Plot[Abs[hkthv8[2,t]],{t,0,400}]

hkthv9[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-10,2}];

Plot[Abs[hkthv9[2,t]],{t,0,400}]

hkthv10[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-20,5}];

Plot[Abs[hkthv10[2,t]],{t,0,400}]

hkthv11[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-20,10}];

Plot[Abs[hkthv11[2,t]],{t,0,400}]

Plot[Abs[hkthv11[2,t]]*t^(a+2),{t,0,400}]

LogLogPlot[Abs[hkthv11[2,t]]*t^(a+2),{t,1,400}]

hkdirv5[k_,t_] :=2^(-7)*Sum[Exp[I*K8[[ep]]*t]*puiss[K8[[ep]],k],{ep,1,128}];

LogLogPlot[Abs[hkdirv5[2,t]],{t,1,100000}]

hkdirmoyv1[k_,t_] :=2^(-7)*Sum[Sinc[K8[[ep]]*t]*(K8[[ep]])^k,{ep,1,128}];

LogLogPlot[Abs[hkdirmoyv1[2,t]]*t^(a+2),{t,1,400}]

LogLogPlot[Abs[hkdirmoyv1[2,t]],{t,1,400}]

LogLogPlot[Abs[hkthv11[2,t]],{t,1,400}]

LogLogPlot[Abs[hkdirv5[2,t]],{t,1,5000}]

hkdirv6[k_,t_] :=3^7*2^(-7)*Sum[N[Integrate[Exp[I*x*t]*x^k,{x,K8[[ep]],K8[[ep]]+3^(-7)}]],{ep,1,128}];

Plot[Abs[hkdirv6[2,t]],{t,1,100}]

N[Integrate[Exp[I*x*10]*x^2,{x,K8[[2]],K8[[2]]+3^(-7)}]]

N[3^(-7)*Exp[I*K8[[2]]*10]*(K8[[2]])^2]

hkdirv6[2,10]

K5:=cantor[5];

Length[K5]

hkdirv7[k_,t_] :=3^4*2^(-4)*Sum[N[Integrate[Exp[I*x*t]*x^k,{x,K5[[ep]],K5[[ep]]+3^(-4)}]],{ep,1,16}];

Plot[Abs[hkdirv6[2,t]],{t,1,100}]

hkthv13[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-40,-20}];

Plot[{Abs[hkthv13[2,t]],Abs[hkdirv5[2,t]]},{t,0,400}]

LogLogPlot[{Abs[hkthv13[2,t]],Abs[hkdirv5[2,t]]},{t,100,400},AxesLabel->{logt,loghk(t)}]

Plot[{Abs[hkthv13[2,t]],Abs[hkdirv5[2,t]]},{t,100,400},AxesLabel->{t,hk(t)}]

hkdirv9[k_,t_] :=2^(-7)*Sum[Exp[I*K8[[ep]]*t]*(K8[[ep]])^k*Exp[-thouless[7,ep]],{ep,1,128}];

Plot[{Abs[hkthv13[2,t]],Abs[hkdirv9[2,t]]},{t,100,400}]

0*Log[0]

log[x_]:= If[x==0,0,N[Log[x]]];

log[3]

log[0]

thouless[k_,ep_]:= 2^(-k)*Sum[log[Abs[K8[[ep]]-K8[[ep1]]]],{ep1,1,2^k}];

2^7

thouless[7,1]

hkdirv9[2,100]

Plot[{Abs[hkthv13[2,t]],Abs[hkdirv5[2,t]]},{t,0,1}]

Plot[{Abs[hkthv13[2,t]],Abs[hkdirv5[2,t]]},{t,0,1},Mesh-> All]

Plot[Abs[hkdirv5[2,t]],{t,0,1},Mesh-> All]

h2dirtest[t_]:= 0.5*3^(-2)*(hkdirv5[2,t/3]+Exp[2*I*t/3]*(hkdirv5[2,t/3]+4*hkdirv5[1,t/3]+4*hkdirv5[0,t/3]));

h2dirtest[10]

hkdirv5[0,10]

2^(-7)*Sum[Exp[I*K8[[ep]]*0]*puiss[K8[[ep]],0],{ep,1,128}]

0^0

puiss[x_,k_]:=If[x==0 && k==0, 1, x^k];

puiss[0,0]

Plot[Abs[h2dirtest[t]],{t,0,50}]

hkthv13[2,3]

hkthv13[2,1]

hkthv13[2,3]*3^(2+a)

N[hkdirv5[2,300]]

N[hkdirv5[2,100]]*3^(2+a)

K8[[70]]

K8v2:=1000*K8;

K8v2[[70]]

hkdirv10[k_,t_] :=2^(-7)*Sum[Exp[I*K8v2[[ep]]*t]*puiss[K8v2[[ep]],k],{ep,1,128}];

Plot[{Abs[hkthv13[2,t]],Abs[hkdirv10[2,t]]},{t,0,1}]

Plot[{Sin[x],Cos[x]},{x,0,1},AxesLabel->{cos,sin}]

Clear[log]

Deltav1[t_]:=Sum[k^2*Abs[hkthv13[k,t]]^2,{k,0,10}];

Deltav1[1]

Plot[Sqrt[Deltav1[t]],{t,0,100}]

LogLogPlot[t^a*Sqrt[Deltav1[t]],{t,1,60}]

LogLogPlot[Sqrt[Deltav1[t]],{t,1,60}]

Deltav2[t_]:=Sum[k^(2*Abs[hkthv13[k,t]]^2,{k,0,10}];

Plot[Im[N[hkdirv5[0,t]]],{t,0,2}]

N[Gamma[1+Log[2]/Log[3]+I]]

Plot[Re[hkdirv5[2,t]],{t,-2,2}]

Plot[N[Im[hkdirv5[2,t]]],{t,-2,2}]

hkthv14[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-40,40}]+Sum[N[(-1)^(d)/Factorial[d]*Exp[-I*Pi*d/2]*2^(k+d)/(0.5*3^(k+d)-1)*t^d],{d,1,10}];

hkthv14[2,15]

Plot[{10^6*Abs[hkdir[2,50*t]],Abs[hkthv14[2,t]]},{t,1,3}]

Plot[Abs[hkdir[2,t]],{t,1,300}]

mom[k_,s_]:=2^(-7)*(Integrate[x^(k-s),{x,0,3^(-7)}]+Sum[K8[[ep]]^(k-s),{ep,2,128}]);

mom[0,a]

Plot[Abs[mom[0,s]],{s,-10,10}]

Plot[{Abs[momcomp[0,s]],Abs[mom[0,s]]},{s,0,10}]

momcomp[k_,s_]:=3^(s-k)*0.5*2^(-7)*Sum[(2+K8[[ep]])^(k-s),{ep,1,128}]+0.5*3^(s-k)*mom[k,s];

momcomp[2,a]

mom[2,a]

mk2dir[2]

Plot[{Abs[mkth[2,s]],Abs[mk2dir[s]]},{s,0,10}]

mkthl1:={};

For[s=1,s<100,s++,AppendTo[mkthl1,Abs[mkth[2,(s-1)/50]]]];

mk2dirl1:={};

For[s=1,s<100,s++,AppendTo[mk2dirl1,Abs[mk2dir[(s)/50]]]];

Abs[mk2dir[10]]

mk2dirl1

For[s=1,s<70,s++,AppendTo[mk2dirl1,Abs[mk2dir[(s+30)/50]]]];

Length[mk2dirl1]

ListPlot[mk2dirl1]

ListPlot[mkthl1]

hkthv14[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-5,5}]+0.5*(2/3)^k*Exp[-I*2*t/3];
hkdirv14[k_,t_] :=3^7/(2^7)*Integrate[Exp[-I*t*x]*x^k,{x,0,3^(-7)}]+2^(-7)*Sum[N[Exp[-I*K8[[ep]]*t]]*(K8[[ep]])^k,{ep,2,128}];

hkdirv14[0,0]

Plot[{Abs[hkdirv14[2,t]],Abs[hkthv14[2,t]]},{t,50,100}]

Plot[Abs[hkdirv14[20,t]],{t,100000,100500}]

hkthv14[2,1]

hkdir[2,1]

Plot[{Abs[hkdirv4[2,t]],Abs[hkthv14[2,t]]},{t,1,10}]

Plot[Abs[hkdir[2,t]],{t,0,100}]

hkthv15[k_,t_]:=t^(-a-k)*Sum[N[t^(-2*I*Pi*m/Log[3])]*rm[m]*Gamma[k+a+2*I*Pi*m/Log[3]]*Exp[0.5*I*Pi*(k+a+2*I*Pi*m/Log[3])],{m,-50,-40}];

Plot[{Abs[hkthv15[2,t]],Abs[hkthv14[2,t]]},{t,4,50}]

Plot[Abs[hkthv15[2,t]],{t,2,10}]

hkthcom[k_,t_] :=0.5*3^(-k)*hkthv15[k,t/3]+0.5*3^(-k)*Exp[-2*I*t/3]*2^(-7)*Sum[N[Exp[-I*K8[[ep]]*t/3]]*(2+K8[[ep]])^k,{ep,1,128}];

Plot[Abs[hkthcom[2,t]],{t,2,10}]

hkdircom[k_,t_] :=0.5*3^(-k)*hkdir[k,t/3]+0.5*3^(-k)*Exp[-2*I*t/3]*2^(-7)*Sum[N[Exp[-I*K8[[ep]]*t/3]]*(2+K8[[ep]])^k,{ep,1,128}];

Plot[{Abs[hkdir[2,t]],Abs[hkdircom[2,t]]},{t,2,10}]

hkthcom14[k_,t_] :=0.5*3^(-k)*hkthv14[k,t/3]+0.5*3^(-k)*Exp[-2*I*t/3]*2^(-7)*Sum[N[Exp[-I*K8[[ep]]*t/3]]*(2+K8[[ep]])^k,{ep,1,128}];

Plot[{Abs[hkthv14[2,t]],Abs[hkthcom14[2,t]]},{t,2,10}]

RSolve[{h0[n]==(1+Exp[-2*I*n/3])*0.5*h0[n/3],h0[0]==1},h0,n]

hkthv15[2,0]

hkdir[2,0]

hkdirv4[k_,t_] :=Integrate[Exp[-I*x*t]*x^k,{x,0,3^(-7)}]+2^(-7)*Sum[N[Exp[-I*K8[[ep]]*t]]*(K8[[ep]])^k,{ep,2,128}];

hkdirv4[0,0]

hkthv16[k_,t_]:= Factorial[k-1]*t^(-k)*Exp[-I*Pi*k/2]*hkdirv4[0,t];

hkthv16[1,10]

Plot[{Abs[hkthv17[2,t]],Abs[hkdirv4[2,t]]},{t,0,9}]

Plot[{Abs[hkthv16[2,t]],Abs[hkthv15[2,t]]},{t,1,5}]

Binomial[3,1]

RSolve[{mn[n]==(1-3^(-n))^(-1)*0.5*3^(-n)*Sum[Binomial[n,j]*mn[n-j]*2^(j),{j,0,n-1}],mn[0]==1},mn[n],n]

RSolve[{mn[n]==(1-3^(-n))^(-1)*0.5*3^(-n)*mn[n-1],mn[0]==1},mn[n],n]

RSolve[{aa[n+1]-2 aa[n]==1,aa[0]==1},aa[n],n]

mn[n_]:=If[n==0,1,(1-3^(-n))^(-1)*0.5*3^(-n)*Sum[Binomial[n,j]*mn[j]*2^(n-j),{j,0,n-1}]];

mn[0]

mn[1]

hkthv17[k_,t_]:=If[t==0,mn[k],Sum[(-I*t)^n*(Factorial[n])^(-1)*mnlist[[n+k]],{n,0,22}]];

hkthv17[2,10]

mnlist:={};

For[n=0,n<1000,n++,AppendTo[mnlist,mn[n]]];

Length[mnlist]

Clear[hkthv17]

lksimple[k_,s_]:=(3/2)^(s-k)/(1-3^(s-k));

lksimple[2,1]

lkpol[k_,r_,th_]:=(3/2)^(r*Cos[th]-k+I*r*Sin[th])/(1-3^(r*Cos[th]-k+I*r*Sin[th]));

lkpol[2,1,0]

lkpolint[k_,r_]:=N[Integrate[lkpol[k,r,x],{x,Pi/2,3*Pi/2}]];

lkpolint[2,1]

N[Integrate[lkpol[2,1,x],{x,Pi/2,3*Pi/2}]]

N[Integrate[lkpol[2,r,x],{x,Pi/2,3*Pi/2}]]

Plot[Abs[lkpolint[2,r]],{r,10000,10010}]

lkpolintlist:={};

For[r=1,r<5,r++,AppendTo[lkpolintlist,Abs[lkpolint[1,1000+100*r]]]];

Length[lkpolintlist]

ListPlot[lkpolintlist]