Author Archives: Mats Granvik
Illustration of the Discrete Fourier Tranform DFT
Mathematica 8: Do[ nn = i; Print[MatrixForm[Transpose[Table[{1}, {n, 1, nn}]]]] Print[MatrixForm[ Table[Table[Cos[-2*Pi*(n – 1)*(k – 1)/nn], {k, 1, nn}], {n, 1, nn}]]] Print[MatrixForm[ Chop[N[Table[ Total[Table[Cos[-2*Pi*(n – 1)*(k – 1)/nn], {k, 1, nn}]], {n, 1, nn}]]]]] , {i, 1, 12}] Signal … Continue reading
Dirichlet character sums for the terms of the von Mangoldt function
The fundamental theorem of arithmetic is encoded by the von Mangoldt function
Mathematica 8 A = Table[ Table[If[Mod[n, k] == 0, Exp[MangoldtLambda[n/k]], “”], {k, 1, 12}], {n, 1, 12}]; MatrixForm[A] Row products of the matrix above are the natural numbers.
Agreement between summatory von Mangoldt function and partial sums of von Mangoldt matrix
Edit 14.10.2012: Unfortunately copy pasting into wordpress makes the code show wrong, and it will not work. Mathematica 8 aa = 32; a = Range[aa]*0; Monitor[Do[ T[n_, k_] := T[n, k] = If[n < 1 || k n, T[k, n], … Continue reading
Fourier transform of the von Mangoldt function with first term equal to a harmonic number
(*Mathematica 8*) Clear[f] scale = 100000; f = ConstantArray[0, scale]; f[[1]] = N@HarmonicNumber[scale]; Monitor[Do[ f[[i]] = N@MangoldtLambda[i] + f[[i – 1]], {i, 2, scale}], i] xres = .002; xlist = Exp[Range[0, Log[scale], xres]]; tmax = 60; tres = .015; Monitor[errList … Continue reading
Zeta zero approximations
In[447]:= N[ 7*Pi – Log[ 2*Pi + Exp[5/2*Pi] + 3/2*Exp[-3/2*Pi] + 5/2*Exp[-5/2*Pi] + 7/2*Exp[-7/2*Pi]], 90] 7*Pi – Log[ 2*Pi + Exp[5/2*Pi] + 3/2*Exp[-3/2*Pi] + 5/2*Exp[-5/2*Pi] + 7/2*Exp[-7/2*Pi]] N[9*Pi – Log[ Exp[4/2*Pi]*3 – Exp[3/2*Pi] – Exp[2/2*Pi]*3 – Exp[1/2*Pi]*3], 90] 9*Pi – … Continue reading
inverted von Mangoldt function plot as sum of cosines
Clear[nn, k, n, a, res]; res = 100; Monitor[a = N[Table[Sum[ MangoldtLambda[n]*1/n* Sum[Cos[-nn*(k – 1)/n*2*Pi], {k, 1, n}], {n, 1, nn}], {nn, 1, res, 1/res}]];, N[nn]] g1 = ListLinePlot[a, DataRange -> {1, res}]; Show[g1, ImageSize -> Full]
Twelve digits
N[Log[2/3*Exp[-5/2*Pi] + Exp[7*Pi – Log[7/2*Exp[-7/2*Pi] + 5/2*Exp[-5/2*Pi] + 3/2*Exp[-3/2*Pi] + Exp[5/2*Pi] + 2*Pi]]], 15] N[Im[ZetaZero[1]], 15] 14.1347251417344… 14.1347251417347…
Periodic sequences from cosine sums.
Mathematica: In[292]:= len = 24; nn = 1; Table[Sum[Cos[n*(k – 1)/nn*2*Pi], {k, 1, nn}], {n, 1, len}] nn = 2; Table[Sum[Cos[n*(k – 1)/nn*2*Pi], {k, 1, nn}], {n, 1, len}] nn = 3; Table[Sum[Cos[n*(k – 1)/nn*2*Pi], {k, 1, nn}], {n, 1, … Continue reading
Dirichlet series converging to zero
Mathematica Clear[j, a1, cc, OnePlusB, n, dd, a] OnePlusB = (1 + N[Sum[(-1)^j*(3*j)^(-1/2), {j, 1, Infinity}], 120]) a1 = N[Sum[ 1/Sqrt[i] – 1/Sqrt[1 + i] – 2/Sqrt[2 + i] – 1/Sqrt[3 + i] + 1/Sqrt[ 4 + i] + 2/Sqrt[5 … Continue reading