File:Meissel–Mertens constant definition.svg
Source: Fix code
← Older revision
Revision as of 07:51, 22 March 2013
Line 18:
Line 18:
Mathematica source to generate graph (which was then saved as SVG from Mathematica):
Mathematica source to generate graph (which was then saved as SVG from Mathematica):
−
primerecip = Table[][][n], {n, 1, 10000000}];
+
primerecip = Table[N[1/Prime[n]], {n, 1, 10000000}];
−
g[x_] := Apply[][][x]]
+
g[x_] := Apply[Plus, Take[primerecip, PrimePi[x]]];
−
base = N[][10^6]/600)];
+
base = N[E^(Log[10^6]/600)];
−
t = Table[][base^x]}, {x, 1, Floor[][base, 10^6] - 1}];
+
t = Table[{base^x, g[base^x]}, {x, 1, Floor[Log[base, 10^6]] - 1}];
−
Show[][t, Joined -> True], LogLinearPlot[][][x], {x, 1, 10^6}, PlotStyle -> ColorData[1, 2], LabelStyle -> FontSize -> 14]
+
Show[ListLogLinearPlot[t, Joined -> True],
+
LogLinearPlot[Log[Log[x]], {x, 1, 10^6},
+
PlotStyle -> ColorData[1, 2]], LabelStyle -> FontSize -> 14]
LaTeX source for labels:
LaTeX source for labels: