Let $M$ be an $n$ by $n$ matrix with each diagonal element equal to $k$ and each non-diagonal element equal to $k-1$ where $n$ and $k$ are positive integers. Let $k < n$ and we can assume both $k$ and $n$ are large.
What is
$$S_{M,k} = \sum_{x \in \mathbb{Z}^n} e^{-x^T M x}\;?$$
Is there some way to estimate this sum?
This was also posted to https://math.stackexchange.com/questions/1741157/how-to-estimate-a-specific-infinite-sum a few days ago.
Added examples
If $k=1$ we know $S_{M,1} \approx (\sqrt{\pi} +2\sqrt{n}e^{-\pi^2})^n \approx 1.7726372048^n$. I don't know a closed form approximation for any other value of $k$.
For $n=12$ and $k = 1, \dots, 12$ using computer code to approximate the sum we get $ 962.58329951, 267.409968069, 196.186732001, 171.404195004, 162.313077353, 158.96911585, 157.738949838, 157.286397212, 157.119912408, 157.058666071, 157.036134803, 157.027846013$.
In general it seems numerically that for every fixed $n$, $S_{M,k}$ converges fairly quickly to some value as $k$ increases towards $n$.