RiemannR[x]
gives the Riemann prime counting function
.
RiemannR
RiemannR[x]
gives the Riemann prime counting function
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- For
, the Riemann prime counting function is given by
. - RiemannR[z] has a branch cut discontinuity in the complex z plane running from
to
. - RiemannR can be evaluated to arbitrary numerical precision.
- RiemannR automatically threads over lists.
Examples
open all close allBasic Examples (2)
RiemannR[1000.]PrimePi[1000]Compare the behavior of RiemannR with the prime counting function
:
Plot[{RiemannR[x], PrimePi[x]}, {x, 1, 50}, PlotLegends -> "Expressions"]Scope (6)
Evaluate for complex arguments:
RiemannR[1.5 + I]N[RiemannR[1 / 2], 50]The precision of the output tracks the precision of the input:
RiemannR[0.500000000000000000000000000000000000000]Simple exact values are generated automatically:
RiemannR[1]RiemannR threads element-wise over lists:
RiemannR[{2.0, 3.0, 4.0}]TraditionalForm formatting:
RiemannR[x]//TraditionalFormApplications (1)
The behavior of RiemannR near the origin:
LogPlot[Abs[RiemannR[10 ^ x]], {x, -25000, 2}, Frame -> True, PlotStyle -> Thickness[0.006], Axes -> False, MaxRecursion -> 4, WorkingPrecision -> 20]//QuietThe largest root of the Riemann prime counting function, which solves a problem originally posed by Waldvogel:
lroot = FindRoot[RiemannR[10 ^ t], {t, -14000}, WorkingPrecision -> 20]10 ^ t /. lrootListLinePlot[N[Table[{t, RiemannR[10 ^ t]}, {t, -15500, -14500, 50}], 20], Epilog -> {Red, PointSize[0.05], Point[{t /. lroot, 0}]}]//Quiet10 ^ t /. FindRoot[RiemannR[10 ^ t], {t, -15300}, WorkingPrecision -> 20]See Also
Related Guides
Related Links
History
Text
Wolfram Research (2008), RiemannR, Wolfram Language function, https://reference.wolfram.com/language/ref/RiemannR.html.
CMS
Wolfram Language. 2008. "RiemannR." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RiemannR.html.
APA
Wolfram Language. (2008). RiemannR. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RiemannR.html
BibTeX
@misc{reference.wolfram_2026_riemannr, author="Wolfram Research", title="{RiemannR}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/RiemannR.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_riemannr, organization={Wolfram Research}, title={RiemannR}, year={2008}, url={https://reference.wolfram.com/language/ref/RiemannR.html}, note=[Accessed: 13-June-2026]}