# Discrepancy with Hurwitz Zeta function

I've come across an issue while using Wolfram Mathematica that I don't quite understand.

Consider the following symbolic computation:

Clear[n, y, x];
Sum[1/(n + y)^x, {n, 0, Infinity}]

HurwitzZeta[x, y]


However, when I plug in specific values (x = 1/3, y = 1) to evaluate the sum:

x = 1/3; y = 1;
Sum[1/(n + y)^x, {n, 0, Infinity}]


I get an error message:

"Sum::div: Sum does not converge."


What confuses me is when I compute HurwitzZeta[1/3, 1] // N, it successfully returns a numerical value: -0.97336.

So, why does the Sum function claim the series doesn't converge, but HurwitzZeta, which should be equivalent according to Mathematica's own symbolic computation, computes a numerical value without issue? Can anyone shed some light on this discrepancy or at least on what I am missing?

• It prints -0.97336 in the cloud... Jul 12, 2023 at 0:57
• @ВалерийЗаподовников I mistakenly made a "rejection" of your edit. Someone else can come by an approve it though. It's not rejected yet. Sorry about that. The edit seems fine. I get -0.97336, too. Jul 12, 2023 at 5:14
• @MichaelE2 done! Thanks for leaving a comment about this. it was very helpful
– bmf
Jul 12, 2023 at 5:18
• @ВалерийЗаподовников By the way, the funny value comes from NSum[1/(n + y)^x, {n, 0, Infinity}]. Jul 12, 2023 at 5:23

## 1 Answer

HurwitzZeta

When calculating a sum one can choose an option GenerateConditions -> True to get appropriate conditions on parameters for convergence of a series

Sum[ 1/(n + y)^x, {n, 0, ∞}, GenerateConditions -> True]

ConditionalExpression[ HurwitzZeta[x, y], Re[x] > 1]


This can be also achieved with SumConvergence[1/(n + y)^x, n].
On the documentation pages it says for it is identical for Re[y] > 0 to Zeta,

FunctionExpand[ HurwitzZeta[ 1/3, 1]]

 Zeta[1/3]


Riemann Zeta and Dirichlet Series

Sum[ 1/k^z, { k, 1, ∞}, GenerateConditions -> True]

 ConditionalExpression[ Zeta[z], Re[z] > 1]


It is defined to be Sum[ 1/n^z, {n, 1, ∞}] for Re[z] > 1, elswhere such a sum is in general divergent and the function is uniquely defined as an analytic continuation of the function for Re[z] > 1.

We can also use a regularization for divergent sums, in this case we find a sum with Regularization -> "Dirichlet", this kind of sums are called Dirichlet series, see e.g. DirichletL[1, 1, 1/3]. Dirichlet regularization can provide a finite sum for obviously divergent series (see also Zeta[-1]):

Sum[ n, {n, 1, ∞}, Regularization -> "Dirichlet"]

 -1/12


z = 1 is the only singularity of Zeta[z],

FunctionDomain[ Zeta[z], z, Complexes]

-1 + z != 0

Sum[ 1/n^(1/3), {n, 1, ∞}, Regularization -> "Dirichlet"]
N @ %

Zeta[1/3]
-0.97336


Analyitic continuation of Zeta for 0 < Re[z] < 1

We can also express Zeta[1/3] in terms of an ordinary series by an analytic continuation, see e.g. 25.2.3

1/(1 - 2^(1 - z)) Sum[ (-1)^(n - 1)/n^z, {n, 1, ∞},
GenerateConditions -> True] // FullSimplify

ConditionalExpression[ Zeta[z], Re[z] > 0]


This is a precise approximation of the series 1/(1 - 2^(2/3)) NSum[(-1)^(n - 1)/n^(1/3), {n, 1, ∞}] although the convergence is rather slow, e.g. 1/(1 - 2^(2/3)) NSum[(-1)^(n - 1)/n^(1/3), {n, 1, 10^12}] yields -0.973275.

• HurwitzZeta[1/3, 1] // N just prints -0.97336. Jul 12, 2023 at 2:48
• And what's the problem? Jul 12, 2023 at 2:50
• No problem. I was just confused what 1.082409227768647*10^18635 is. Jul 12, 2023 at 2:55
• That's only an unreasonable edit by JimB. Numerically it yields as you've mentioned. Jul 12, 2023 at 3:00
• Odd that Mma cannot handle the same sum in the form Sum[1/(1 + n)^(1/3), {n, 0, \[Infinity]}, Regularization -> "Dirichlet"]. (+1 for the answer, of course.) Jul 12, 2023 at 5:20