I have already asked a similar question about Ramanujan's summation in general but received no good answers. Now I am interested in this exact series:
$$\sum _{n\ge1}^\Re (24 n + 12 n^2)$$
I have already asked a similar question about Ramanujan's summation in general but received no good answers. Now I am interested in this exact series:
$$\sum _{n\ge1}^\Re (24 n + 12 n^2)$$
From solution provided by kirma to your previous question
Sum[24 n + 12 n^2, {n, 1, Infinity}, Regularization -> "Dirichlet"]
(* -2 *)
From solution provided by xzczd to your previous question
ramanujanSum[f_] :=
Block[{x, n},
FullSimplify[-Sum[
BernoulliB[n, 1]/n SeriesCoefficient[
f[x], {x, 0, n - 1}], {n, \[Infinity]}], n >= 1]]
ramanujanSum[24 # + 12 #^2 &]
(* -2 *)
From Wikipedia $$1+2+3+\cdots +=-\frac{1}{12}(R)$$
Extending to positive even power, this give:
$$1+2^{2k}+3^{3k}+\cdots +=0(R)$$
24*(-1/12) + 12*(0)
(* -2 *)
Using the Zeta function you can calculate arbitrary expression like in your example.
g = 24 Zeta [-1 ] + 12 Zeta [-2]
(* -2 *)