How to estimate a specific infinite sum 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?

Update April 21 2016
Hajo argues below that $S_{M,k} \leq S_{M,1} = (\sum_{x=-\infty}^{\infty} e^{-x^2})^n$.  This bound may however be loose when $k \gg 1$.
 A: We can write 
$$M=I+(k-1)ee^\top \text{ with } e=(1,\ldots,1)^\top$$
so we get the eigenvalues 
$$ \lambda_1=1,\ldots,\lambda_{n-1}=1,\lambda_n=n(k-1)+1$$ 
to the orthonormal eigenvectors 
$$v_1,\ldots,v_n \text{ with } v_n=\frac{1}{\sqrt{n}}e\text{.}$$
We can write the term from the exponent as 
$$x^\top Mx=x^\top x + (k-1)(x^\top e)(e^\top x)$$
Plugged in the given term
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} = \sum_{x\in \mathbb{Z}^n} \exp \bigl(-(\lVert x\rVert_2^2 + (k-1)(x^\top e)^2 )\bigr)$$ 
now we decompose $\mathbb{Z}^n$ into surfaces of hypercubes with help of $\lVert x\rVert_\infty = \max_{i=1,\ldots,n}\lvert x_i\rvert$. 
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} = e^0 + \sum_{r=1}^\infty\sum_{\stackrel{x\in \mathbb{Z}^n}{\lVert x\rVert_\infty=r}} \exp \bigl(-(\lVert x\rVert_2^2 + (k-1)(x^\top e)^2 )\bigr)\text{.}$$
To get a estimation from above, we use the eigenvector (independent from $k$)
$$v=(r,-r,0,\ldots,0) \text{ with } v^\top Mv=2r^2$$ with the smallest 2-norm to the smallest eigenvalue $1$, and get
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} \leq e^0 + \sum_{r=1}^\infty\Bigl\lvert\{x\in \mathbb{Z}^n\big\vert\lVert x\rVert_\infty=r\}\Bigr\rvert e^{-2r^2}\text{.}$$
The number of point in this set is the number of points in the full hypercube minus the number of points of the smaller hypercube
$$\Bigl\lvert\{x\in \mathbb{Z}^n\big\vert\lVert x\rVert_\infty=r\}\Bigr\rvert=(2r+1)^n-(2(r-1)+1)^n=(2r+1)^n-(2r-1)^n$$
Hence,
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} \leq 1 + \sum_{r=1}^\infty \bigl((2r+1)^n-(2r-1)^n\bigr)e^{-2r^2}\text{.}$$
Similarly, we can use the eigenvector 
$$v=(r,\ldots,r) \text{ with } v^\top Mv=nr^2+(k-1)(nr)^2=nr^2(1+n(k-1))$$ with the biggest 2-norm to the biggest eigenvalue $\lambda_n=n(k-1)+1$ to get an estimate from below
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} \geq 1 + \sum_{r=1}^\infty \bigl((2r+1)^n-(2r-1)^n\bigr)\exp\bigl(-nr^2(1+n(k-1))\bigr)\text{.}$$

Added: For a upper bound we use $(k-1)(x^\top e)^2 \geq 0$ for all $x\in \mathbb{Z}^n$, together with $\lVert x\rVert_2^2=\sum_{i=1}^n x_i^2$ and $e^{a+b}=e^a\cdot e^b$ to get
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} \leq \sum_{x\in \mathbb{Z}^n} \prod_{i=1}^n e^{-x_i^2}=\sum_{x_1\in \mathbb{Z}} \sum_{x_2\in \mathbb{Z}}\cdots \sum_{x_n\in \mathbb{Z}}\prod_{i=1}^n e^{-x_i^2}=\sum_{x_1\in \mathbb{Z}} e^{-x_1^2} \sum_{x_2\in \mathbb{Z}}\cdots \sum_{x_n\in \mathbb{Z}}\prod_{i=2}^n e^{-x_i^2}\text{.}$$
Thus, we have an upper bound
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} \leq \Bigl(\sum_{x\in \mathbb{Z}} e^{-x^2}\Bigr)^n$$
And with help of this answer we get 
$$\sum_{x\in \mathbb{Z}^n} e^{-x^\top M x} \leq \Bigl(\sqrt{\pi}+2\sqrt{\pi}\sum_{m=1}^{\infty}\exp(-m^2\pi^2) \Bigr)^n\text{.}$$
The estimate is again independent from $k$ but should be sharp/exact for $k=1$. ($k=1\Rightarrow M=I$)
