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

hkdirv15[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}];

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

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,-20,10}]+Sum[N[(-1)^(d)/Factorial[d]*Exp[-I*Pi*d/2]*2^(k+d)/(0.5*3^(k+d)-1)*t^d],{d,0,1000}];

hkthv17[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}];

hkthv16[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}]+0.5*(2/3)^k*Exp[-I*2*t/3];

comp1[k_,t_]:=Sum[(-I)^(d)/Factorial[d]*2^(k+d)/(0.5*3^(k+d)-1)*t^d,{d,0,10000}];

comp2[k_,t_]:=0.5*(2/3)^k*Exp[-I*2*t/3];
hkthv19[k_,t_]:=Sum[(-1)^(d)/Factorial[d]*Exp[I*Pi*d/2]*2^(k+d)/(0.5*3^(k+d)-1)*t^d,{d,0,5000}];

ListPlot[K8]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv17[3,t]]},{t,50,150}]

Plot[Abs[hkthv17[3,t]],{t,50,150}]

a

hkdirv18[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}];

hkthv18[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}]+0.5*(2/3)^k*Exp[I*2*t/3];

Plot[{Abs[hkdirv18[3,t]],Abs[hkthv18[3,t]]},{t,50,150}]

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

ConditionalExpression[(E^(-(1/2) I π s)) Gamma[s],0<Re[s]<1];
N[Log[2]/Log[3]]

Integrate[Exp[-I*u]*Sin[u]*u^(s-2),{u,0,Infinity}]

Int1[s_]:=Integrate[Exp[-I*u]*Sin[u]*u^(s-2),{u,0,Infinity}];

Int1[0.5]

Plot3D[Abs[Int1[x+I*y]],{x,0,1},{y,-10,10}]

mk[k_,s_]:= Gamma[s]*Exp[-I*Pi*0.5*s]*0.5*(3/2)^(s-k)/(1-0.5*3^(s-k));

Plot3D[Abs[mk[2,x+I*y]],{x,-10,10},{y,0,1}]

Gamma[0]

Plot3D[Abs[Gamma[x+I*y]],{x,-3,3},{y,-5,5}]

Abs[Gamma[-10+I*0]]

Plot[Gamma[x],{x,0,-19}]

Plot3D[Abs[Gamma[x+I y]],{x,-3,3},{y,-3,3},PlotRange ¬{-1,10},AxesLabel ¬{"Re","Im"}]

Plot3D[Abs[Gamma[x+I y]],{x,-3,3},{y,-3,3},PlotRange ->{-1,10},AxesLabel ->{"Re","Im"}]

Plot3D[Abs[mk[2,x+I y]],{x,-1,4},{y,-100,100},PlotRange ->{-1,10},AxesLabel ->{"Re","Im"}]

N[2+Log[2]/Log[3]]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv19[3,t]]},{t,0,50}]

LogLogPlot[Abs[hkdirv15[10,t]],{t,100,1500}]

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

hkthv20[k_,t_]:=Sum[(-1)^(d)/Factorial[d]*Exp[I*Pi*d/2]*rk[k,-d]/(1-0.5*3^(-k-d))*t^d,{d,0,100}];

Plot[{Abs[rk[30,s]], Exp[0.05*(s-30)]},{s,-1000,2}]

hkthv20[3,3]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv20[3,t]]},{t,0,50}]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv20[3,t]]},{t,0,25}]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv20[3,t]]},{t,0,25}]

rk[3,0]

rki[m_]:=Sum[2^(-7)*(K8[[j]]+2)^(m),{j,1,128}];

Plot[{rki[m],0.5*3^(-m)*(8^m+8^m)},{m,0,30}]

hkthv21[k_,t_]:=8^k*9^(-k)*Exp[-I*t*8/9];

Plot[{Re[hkdirv15[3,t]],Re[hkthv21[3,t]]},{t,0,25}]

mum[m_]:=Integrate[x^m,{x,0,3^(-7)}]+Sum[2^(-7)*(K8[[j]])^(m),{j,2,128}];

N[mum[1]]

DiscretePlot[mum[m],{m,0,100}]

N[mum[2]]

N[3/8]

mumlist:={};

For[m=0,m<1000,m++,AppendTo[mumlist,mum[m]]];

FindFit[mumlist,b*x^(-c)+d,{b,c,d},x]

DiscretePlot[{mum[mm],0.6*mm^(-a)},{mm,3,1000}]

FindFit[mumlist,b*Exp[x*c]+d,{b,c,d},x]

N[Log[2]/Log[3]]

FindFit[mumlist2,b*c^(-(500+x))+d,{b,c,d},x]

mumlist2:={};

For[mm=500,mm<1000,mm++,AppendTo[mumlist2,mum[mm]]];

DiscretePlot[{mum[mm],(1+mm/2)*2^(mm-1)/(3^mm)},{mm,10,1000}]

FourierTransform[Abs[hkdirv15[3,x]],x,z]

hkdir15list:={};

For[k=10,k<1000,k++,AppendTo[hkdir15list,Abs[hkdirv15[3,k]]]];

fhk:=Fourier[hkdir15list];

ListPlot[Abs[fhk]]

ListPlot[hkdir15list]

Plot[Abs[hkdirv15[3,t]],{t,0,1000}]

LogLogPlot[Re[hkdirv15[3,t]],{t,1,1000}]

f[k_,t_,b_]:=Sum[(0.5*3^(-k))^j*(Exp[-I*t*(2+b)*3^(-j)]),{j,0,Infinity}];

N[f[1,1,0.5]]

LogLogPlot[Abs[f[3,t,0.5]],{t,100,400}]

mum2[m_]:=Integrate[(2+x)^m,{x,0,3^(-7)}]+Sum[2^(-7)*(2+K8[[j]])^(m),{j,2,128}];

DiscretePlot[{(2.8)^mm,mum2[mm]},{mm,0,100}]

hkthv22[k_,t_]:=2.8^k*Sum[(0.5*3^(-k))^j*Exp[-I*t*2.8*3^(-j)],{j,1,Infinity}];

hkthv22[3,4]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv22[3,t]]},{t,0,25}]

hkthv23[k_,t_]:=Sum[(-I)^n*t^n*(Factorial[n])^(-1)*3^(-n-k)/(2-3^(-k-n))*2.8^(n+k),{n,0,Infinity}];

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv23[3,t]]},{t,1,20}]

N[hkthv23[3,1]]

DiscretePlot[{mum[mmm]*(2*3^mmm-1),mum2[mmm]},{mmm,0,10}]

DiscretePlot[mum[mmm]*(2*3^mmm-1),{mmm,0,10}]

hkthv24[k_,t_]:=k^(-a)+Sum[(-I)^n*t^n*(Factorial[n])^(-1)*0.6*(n+k)^(-a),{n,1,Infinity}];

N[hkthv24[3,0]]

3^(-a)

N[mum[3]]

Plot[{Abs[hkdirv15[3,t]],Abs[hkthv24[3,t]]},{t,1,20}]

g[k_,t_]:=Sum[(-I)^n*t^n*(Factorial[n])^(-1)*(n+k)^(-a),{n,0,Infinity}];

g

g[100,t]

k

Plot[Abs[hkdirv15[20,t]],{t,0,2}]

hk15k20b:={};

For[t=0,t<1000,t++,AppendTo[hk15k20b,Abs[hkdirv15[20,t/500]]]];

Length[hk15k20b]

ListPlot[hk15k20b]

Plot[{Abs[hkdirv15[10,t]],Abs[hkthv24[10,t]]},{t,20,25}]

Plot[{Abs[hkdirv15[10,t]],Abs[hkthv24[10,t]]},{t,0,5}]

Abs[hkdirv15[10,0.33333]]

Plot[Abs[hkdirv15[10,t]],{t,0,0.5}]

LogLogPlot[Abs[hkdirv15[10,t]],{t,0.01,0.5}]

Plot[Abs[hkthv24[10,t]],{t,0,2}]

Plot[{Abs[hkdirv15[1,t]],Abs[hkthv24[1,t]]},{t,0,5}]

Plot[t^10*Abs[hkdirv15[10,t]],{t,0,0.5}]

test[t_]:=Sum[t^b*(Factorial[b])^(-1),{b,0,Infinity}];

test[t]

t

test[oo]

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

Plot[{Abs[hkthv24[3,t]],Abs[hk24comp[3,t]]},{t,0,30}]

hkthv25[k_,t_]:=(k-I*t)^(-a);

Plot[{Abs[hkdirv15[10,t]],0.65*Abs[hkthv25[10,t]]},{t,0,3}]

Plot[{Abs[hkdirv15[3,t]],0.65*Abs[hkthv25[3,t]]},{t,0,30}]

Plot[{Abs[hkdirv15[3,t]],0.65*Abs[hkthv25[3,t]]},{t,100,130}]

Plot[Abs[hkdirv15[4,t]],{t,0,500}]

Plot[Abs[hkthv25[3,t]],{t,0,500}]

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

Plot[{Abs[hk25comp[10,t]],Abs[hkthv25[10,t]]},{t,0,30}]

Plot[{Abs[hkdirv15[3,t]],Abs[hkdirv15[9,t]],Abs[hkdirv15[27,t]]},{t,0,500}]

Integrate[Log[(1+Exp[-x])/2]*x^(s-1),{x,0,Infinity}]

Plot[{Abs[hkdirv15[4,t]],Abs[hkdirv15[19,t]],Abs[hkdirv15[31,t]]},{t,0,500}]

DiscretePlot[{Abs[hkdirv15[3,2*Pi*3^t]],Abs[hkdirv15[31,2*Pi*3^t]]},{t,0,500}]

Residue[Gamma[z]*Zeta[1+z]*a^(-z)*(1-c)^(-z)*(1-2^(-z))/(1-c^(-z)),{z,0}]

hkthv26[k_,t_]:=Exp[-I*t]*(k^(-a)+Sum[(-I)^n*t^n*(Factorial[n])^(-1)*0.6*(n+k)^(-a),{n,1,Infinity}]);

N[hkthv26[3,3]]

Plot[Abs[hkthv26[4,t]],{t,0,5}]

DiscretePlot[{Abs[hkthv24[3,2*Pi*3^t]],Abs[hkthv24[31,2*Pi*3^t]]},{t,20,30}]

h0th[t_]:=Product[0.5*(1+Exp[-2*I*t*3^(-k)]),{k,1,500}];

h0th[0.5*Pi(2*9+1)*3^1]

Plot[{Abs[hkdirv15[0,t]],Abs[h0th[t]]},{t,0,100}]

h0thlist:={};

For[t=0,t<100,t++,AppendTo[h0thlist,Abs[h0th[t]]]];

h0th[1]

zero[m_,n_]:=0.5*Pi*(2*m+1)*3^n;

zl:={};

For[m=-100,m<101,m++,For[n=1,n<101,n++,AppendTo[zl,zero[m,n]]]];

Length[zl]

ListPlot[zl]

DiscretePlot[{zero[m,1],zero[m,2],zero[m,3]},{m,-100,100}]

1+Exp[-2*I*0.5*Pi(2*500+1)*3^1*3^(-1)]

Plot[{Abs[hkdirv15[0,t]],Abs[hkdirv15[1,t]],Abs[hkdirv15[31,t]]},{t,0,500}]

Plot[{Abs[hkdirv15[0,t]],Abs[h0th[t]]},AxesLabel->{h_0(t)}]

Plot[{Abs[hkdirv15[0,t]],Abs[h0th[t]]},{t,0,300},AxesLabel->{h_ 0 t}]

Plot[{Abs[hkdirv15[0,t/3^2]],Abs[hkdirv15[1,t/3]],Abs[hkdirv15[2,t]]},{t,0,300}]

Plot[{Abs[hkdirv15[0,t/3^15]],Abs[hkdirv15[1,t/3^14]],Abs[hkdirv15[2,t/3^13]],Abs[hkdirv15[15,t]]},{t,0,300}]

DiscretePlot[Abs[hkdirv15[0,2*Pi*m*3]],{m,0,100}]

DiscretePlot[Abs[h0th[Pi*2*3^m]],{m,0,100}]

DiscretePlot[Abs[hkdirv15[1,Pi*5*3^m]],{m,0,100}]

hkdirv15[1,Pi*5*3^0]

Abs[1.5*hkdirv15[0,2*Pi]]

DiscretePlot[Abs[hkdirv15[0,Pi*m*3^1]],{m,0,100}]

LogLogPlot[{Abs[hkdirv15[0,t/3^2]],Abs[hkdirv15[1,t/3]],Abs[hkdirv15[2,t]]},{t,1,300}]

deltat1[t_]:=Sum[k^2*(Abs[hkdirv15[k,t]])^2,{k,0,10}];

deltat1[1]

Plot[deltat1[t],{t,0,100}]

Plot[{deltat1[t],deltat1[t/3]},{t,0,100}]

Plot[{Abs[hkdirv15[5,t]],Abs[(1+Exp[-2*I*t/3])*0.5*3^(-5)*hkdirv15[5,t/3]+0.5*3^(-5)*2^5*Exp[-2*I*t/3]*hkdirv15[0,t/3]]},{t,0,500}]

hkdirv15[5,0.5*Pi*3^6]

0.5*Pi*3^6

Abs[(1+Exp[-2*I*100/3])*0.5*3^(-5)*hkdirv15[5,100/3]+0.5*3^(-5)*2^5*Exp[-2*I*100/3]*hkdirv15[0,100/3]]

Abs[h0th[Pi]]

Plot[{(1/3)*Abs[hkdirv15[0,t/3]],Abs[hkdirv15[1,t]]},{t,0,100}]

Plot[{Abs[hkdirv15[0,t/(3^4)]],Abs[hkdirv15[1,t/27]],Abs[hkdirv15[2,t/9]],Abs[hkdirv15[3,t/3]],Abs[hkdirv15[4,t]]},{t,0,300}]

LogLogPlot[{Abs[hkdirv15[1,t/27]],Abs[hkdirv15[2,t/9]],Abs[hkdirv15[3,t/3]],Abs[hkdirv15[4,t]]},{t,1,100}]

0.06757/0.2888

0.0

0.288/3

Plot[{(1/3^4)*Abs[hkdirv15[0,t/(3^4)]],(1/3^3)*Abs[hkdirv15[1,t/27]],(1/3^2)*Abs[hkdirv15[2,t/9]],(1/3)*Abs[hkdirv15[3,t/3]],Abs[hkdirv15[4,t]]},{t,0,300}]

Plot[{Abs[hkdirv15[2,t]],Abs[2/(I*t)*hkdirv15[1,t]-I/t*hkdirv15[2,t]]},{t,1,100}]

Plot[Abs[1/(I*t)*hkdirv15[1,t]+I/t*hkdirv15[2,t]],{t,1,100}]

Plot[Abs[hkdirv15[2,t/3]]/Abs[hkdirv15[3,t]],{t,0,80}]

Plot[{Abs[hkdirv15[31,t/9]],Abs[hkdirv15[32,t/3]],Abs[hkdirv15[33,t]]},{t,0,300}]

Table[0,{1,10}]

la:=listcos[al,30];

listcos1:=listcos[Sqrt[2],30];

listcos1[[1]]

matcos[al_]:=SparseArray[{Band[{2,1}]->-1,Band[{1,1}]->la,Band[{1,2}]->-1},30];

m5:=SparseArray[{Band[{2,1}]->-1,Band[{1,1}]->la,Band[{1,2}]->-1},30];

m5[[2,2]]

listcos[al_,n_]:=If[n==0,{},AppendTo[listcos[al,n-1],Cos[2Pi*n*al]]];

listcos[1,2]

CharacteristicPolynomial[m5,x]

SparseArray[{Band[{2,1}]->-1,Band[{1,1}]->la,Band[{1,2}]->-1},5]//MatrixForm

m6:=SparseArray[{Band[{2,1}]->-1,Band[{1,1}]->la,Band[{1,2}]->-1},5];

CharacteristicPolynomial[m6,x]

Integrate[x^l*Exp[-I*x*t],{x,0,b}]

Integrate[x^l*Exp[-I*x*t],{x,c,b}]

Plot[{Abs[hkdirv15[0,t]],Abs[hkdirv15[1,t]]},{t,0,1000}]

N[253/Pi]

DiscretePlot[Abs[hkdirv15[0,Pi*3^n]],{n,0,5}]

Abs[hkdirv15[0,13*Pi*3^6]]

Abs[hkdirv15[1,Pi*3^2]]

2^8

Plot3D[x^5*y^8,{x,0,1},{y,0,1}]

Integrate[x^k*y^l,{x,0,1},{y,0,1}]

Integrate[x^k*[Integrate[y^l,{y,x-u,x+u}]],{x,0,1}]

Plot3D[1,{x,0,1},{y,x-u,x+u}]

Plot3D[x/x+y/y,{x,0.1,1},{y,x-u,x+u}]

Integrate[x^k*Integrate[y^l,{y,x-u,x+u}],{x,0,1}]