OFFSET
1,1
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 1.10 Madelung's constant, p. 77.
LINKS
Eric Weisstein's MathWorld, Madelung Constants
FORMULA
N_3 = Pi^2/3-Pi*log(2)-(Pi/sqrt(2))*log(2(sqrt(2)+1))+8 Pi*Sum_{m,n >= 1} (-1)^n csch(Pi*sqrt(m^2+2n^2))/sqrt(m^2+2n^2).
EXAMPLE
-2.51935615208944531334271172732943791211649913675173257750066...
MATHEMATICA
digits = 101; Clear[s]; s[max_] := s[max] = NSum[(-1)^n Csch[Pi *Sqrt[m^2 + 2 n^2]]/Sqrt[m^2 + 2 n^2], {m, 1, max}, {n, 1, max}, Method -> "AlternatingSigns", WorkingPrecision -> digits + 10]; s[10]; s[max = 20]; Print[max]; While[RealDigits[s[max], 10, digits + 5][[1]] != RealDigits[s[max/2], 10, digits + 5][[1]], max = max*2; Print[max]]; N3 = Pi^2/3 - Pi*Log[2] - Pi/Sqrt[2] Log[2 (Sqrt[2] + 1)] + 8 Pi*s[max]; RealDigits[N3, 10, digits][[1]]
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Jean-François Alcover, Apr 24 2016
STATUS
approved