# How to perform this indefinite sum?

The following indefinite sum with (CC[n]=1 for even n and CC[n]=i for odd n)

CC[n_] := (1/2 + I/2) (1 + I (-1)^(-1 + n))

Sum[Exp[-\[Pi] \[Alpha]^2 (n2^2 + n3^2)] CC[n1 + n2] Conjugate[
CC[n1]] CC[n1 + n3] Conjugate[CC[n1 + n2 + n3]], {n1, 0,
NN - 1}, {n2, -Infinity, Infinity}, {n3, -Infinity, Infinity}]


doesn't seem to work. Surely there is a better method?

• In the sum above, NN=2 and [Alpha] is assumed to be real. – 121 Jan 23 '18 at 11:51

summand =
Exp[-\[Pi] \[Alpha]^2 (n2^2 + n3^2)] CC[n1 + n2] Conjugate[
CC[n1]] CC[n1 + n3] Conjugate[CC[n1 + n2 + n3]] //
FullSimplify[#,
n1 \[Element] Integers && n2 \[Element] Integers &&
n3 \[Element] Integers] &

Sum[summand, {n1, 0, NN - 1}, {n2, -Infinity,
Infinity}, {n3, -Infinity, Infinity}] /. NN -> 2

(*    1/8 (8 EllipticTheta[3, 0, E^(-\[Pi] \[Alpha]^2)]^2 +
16 EllipticTheta[3, 0, E^(-\[Pi] \[Alpha]^2)] EllipticTheta[4, 0,
E^(-\[Pi] \[Alpha]^2)] -
8 EllipticTheta[4, 0, E^(-\[Pi] \[Alpha]^2)]^2)    *)