1 Introduction

The well know Poisson summation formula says that, for any positive real t ,

$$\begin{aligned} \sum _{k\in {\mathbb {Z}}}e^{-k^{2}t}=\sqrt{\frac{\pi }{t}}\sum _{n\in {\mathbb {Z}} }\exp \left( -\frac{\pi ^{2}n^{2}}{t}\right) . \end{aligned}$$
(1.1)

It can be proved by using the heat kernel \(p_{t}^{\mathbb {S}}\left( x,y\right) \) on the unit circle \({\mathbb {S}}\) as follows. For the trace of the heat operator

$$\begin{aligned} P_{t}f\left( x\right) =\int _{\mathbb {S}}p_{t}^{\mathbb {S}}\left( x,y\right) f\left( y\right) \textrm{d}y, \end{aligned}$$

acting in \(L^{2}\left( {\mathbb {S}}\right) \), there are two expressions as follows:

$$\begin{aligned} \mathop {\textrm{trace}}\nolimits P_{t}=\sum _{j=0}^{\infty }e^{-\lambda _{j}t}, \end{aligned}$$
(1.2)

where \(\left\{ \lambda _{j}\right\} \) is the sequence of all the eigenvalues of the Laplace operator \(\Delta =\frac{d^{2}}{\textrm{d}x^{2}}\) on \({\mathbb {S}}\) counted with multiplicity, and

$$\begin{aligned} \mathop {\textrm{trace}}\nolimits P_{t}=\int _{\mathbb {S}}p_{t}^{\mathbb {S}}\left( x,x\right) \textrm{d}x. \end{aligned}$$
(1.3)

Comparing (1.2) and (1.3), using that that the sequence \(\left\{ \lambda _{j}\right\} \) consists of the numbers \(k^{2},\) \(k\in {\mathbb {Z}}\), and that

$$\begin{aligned} p_{t}^{\mathbb {S}}\left( x,y\right) =\sum _{n\in {\mathbb {Z}}}p_{t}^{\mathbb {R}}\left( x+2\pi n,y\right) \end{aligned}$$

where

$$\begin{aligned} p_{t}^{\mathbb {R}}\left( x,y\right) =\frac{1}{\left( 4\pi t\right) ^{n/2}} \exp \left( -\frac{\left| x-y\right| ^{2}}{4t}\right) \end{aligned}$$

is the Gauss-Weierstrass function, one obtains (1.1) (see, for example, [5, Exercise 10.18]).

Similar ideas have been widely used in the literature for obtaining various trace formulas and estimates of eigenvalues of Riemannian manifolds, for example, in [1, 3, 4], etc. In the framework of graphs we mention [2] where the above idea was applied to the heat kernels \(p_{t}^{T}\left( x,y\right) \) on discrete tori T in \({\mathbb {Z}}^{n}\) and, hence, a certain analogue of the Poisson summation formula was obtained.

In this paper we also work with discrete tori but use a discrete time heat kernel \(q_{s}\left( x,y\right) \), \(s\in {\mathbb {Z}}_{+}\), instead of the one with a continuous time \(t\in {\mathbb {R}}_{+}\). In fact, \(q_{s}\left( x,y\right) \) is the transition density of a simple random walk on the graph in question. As a result, we obtain explicit formulas for some trigonometric sums that seems to be new.

Our results are stated in Theorem 3.2 and Corollary 3.4. To illustrate them, let us present them for 2-dimensional discrete tori. For any \(2\times 2\) integer matrix M and for any non-negative integer s, set

$$\begin{aligned} C_{s}\left( M\right) =\sum _{\begin{array}{c} v\in M{\mathbb {Z}}^{2},~z\in {\mathbb {Z}} _{+}^{2} \\ \left| v_{1}\right| +\left| v_{2}\right| +2z_{1}+2z_{2}=s \end{array}}\frac{s!}{z_{1}!z_{2}!\left( \left| v_{1}\right| +z_{1}\right) !\left( \left| v_{2}\right| +z_{2}\right) !}. \end{aligned}$$
(1.4)

Consider a \(2\times 2\) integer matrix \({\mathcal {A}}\) with \(m:=\det {\mathcal {A}} \mathbb {>}1.\) Then the lattice \({\mathcal {A}}{\mathbb {Z}}^{2}\) contains \(m {\mathbb {Z}}^{2}\) so that the quotient

$$\begin{aligned} {\mathcal {T}}_{\mathcal {A}}={\mathcal {A}}{\mathbb {Z}}^{2}/m{\mathbb {Z}}^{2} \end{aligned}$$

is well defined (in the sense of groups) and can be regarded as a discrete torus. Note that \({\mathcal {T}}_{\mathcal {A}}\) contains m vertices.

Theorem 1.1

For any non-negative integer s, we have the identity

$$\begin{aligned} \sum _{\left( k,l\right) \in {\mathcal {T}}_{\mathcal {A}}}\left( \cos \frac{2\pi k}{m}+\cos \frac{2\pi l}{m}\right) ^{s}=\frac{m}{2^{s}}C_{s}\left( M\right) , \end{aligned}$$
(1.5)

where \(M=m\left( {\mathcal {A}}^{*}\right) ^{-1}\) and \({\mathcal {A}}^{*}\) denotes the transpose of \({\mathcal {A}}\).

Example 1.2

Consider the matrix

$$\begin{aligned} {\mathcal {A}}=\left( \begin{array}{cc} 3 &{} 1 \\ -1 &{} 2 \end{array} \right) \end{aligned}$$

with \(m=\det A=7.\) The torus \({\mathcal {T}}_{A}\) is shown on Fig. 1 , and it contains the following 7 vertices: \(\left( 0,0\right) \), \(\left( 1,2\right) \), \(\left( 2,4\right) \), \(\left( 4,1\right) \), \(\left( 3,6\right) \), (6, 5), \(\left( 5,3\right) .\)

Fig. 1
figure 1

The lattice \(7{\mathbb {Z}}^{2}\) (double lines), the lattice \({\mathcal {A}} {\mathbb {Z}}^{2}\) (single lines) and the torus \({\mathcal {T}}_{A}\) (shaded)

Hence, the sum in the left hand side of (1.5) is equal to

$$\begin{aligned} \sigma _{s}&:=2^{s}+\left( \cos \frac{2\pi }{7}+\cos \frac{4\pi }{7}\right) ^{s}+\left( \cos \frac{4\pi }{7}+\cos \frac{8\pi }{7}\right) ^{s}+\left( \cos \frac{8\pi }{7}+\cos \frac{2\pi }{7}\right) ^{s} \\&\ \ \ \ \ +\left( \cos \frac{6\pi }{7}+\cos \frac{12\pi }{7}\right) ^{s}+\left( \cos \frac{12\pi }{7}+\cos \frac{10\pi }{7}\right) ^{s}+\left( \cos \frac{10\pi }{7}+\cos \frac{6\pi }{7}\right) ^{s}. \end{aligned}$$

In this case the matrix M is equal to

$$\begin{aligned} M=\left( \begin{array}{cc} 2 &{} 1 \\ -1 &{} 3 \end{array} \right) , \end{aligned}$$

and the lattice \(M{\mathbb {Z}}^{2}\) is shown on Fig. 2

Fig. 2
figure 2

The lattice \(M{\mathbb {Z}}^{2}\)

Computation by means of (1.4) is performed in Sect. 3.3 and results in

$$\begin{aligned} C_{1}\left( M\right) =0,\ C_{2}\left( M\right) =4,\ C_{3}\left( M\right) =6,\ C_{4}\left( M\right) =44,\ \ C_{5}\left( M\right) =130 \end{aligned}$$

By (1.5) we have \(\sigma _{s}=\frac{7}{2^{s}}C_{s}\left( M\right) \) which yields

$$\begin{aligned} \sigma _{1}=2,\ \ \sigma _{2}=7,\ \ \sigma _{3}=\frac{21}{4},\ \ \sigma _{4}= \frac{77}{4},\ \ \ \sigma _{5}=\frac{455}{16}. \end{aligned}$$

The structure of this paper is as follows. In Sect. 2 we have collected all necessary information about the Markov operators on weighted graph and their heat kernels, including the heat kernels on Cartesian products and quotients of graphs. These facts are rather elementary but they are hardly available in the literature in this concise form. Section 3 contains the main results mentioned above, their proofs, and examples.

2 Discrete Time Heat Kernels

2.1 Weighted Graphs

We briefly outline some fact from [6] about heat kernels on weighted graphs. Let \(\Gamma \) be a locally finite graph where we denote by \( \Gamma \) also the set of vertices of this graph. We write \(x\sim y\) if the vertices xy of \(\Gamma \) are connected by an edge in \(\Gamma \). Let \(\mu _{xy}\) be a symmetric non-negative function on pairs xy of vertices such that \(\mu _{xy}>0\Leftrightarrow x\sim y.\) Define the weight on the vertices of \(\Gamma \) by

$$\begin{aligned} \mu \left( x\right) =\sum _{\left\{ y\in \Gamma :y\sim x\right\} }\mu _{xy}=\sum _{y\in \Gamma }\mu _{xy} \end{aligned}$$

and assume in what follows that \(\mu \left( x\right) >0\) for all \(x\in \Gamma \) (that is, each vertex has at least 1 edge).

Consider a Markov operator \(P=P_{\Gamma }\) acting on functions \(f:\Gamma \rightarrow {\mathbb {R}}\) as follows:

$$\begin{aligned} Pf\left( x\right) =\frac{1}{\mu \left( x\right) }\sum _{y\in \Gamma }f\left( y\right) \mu _{xy}\,. \end{aligned}$$

It is clear that \(Pf\ge 0\) if \(f\ge 0\) and \(P1=1.\) It follows that P acts in any space \(l^{r}\left( \Gamma ,\mu \right) \) with \(r\in \left[ 1,\infty \right] \) and satisfies the norm-bound \(\left\| P\right\| \le 1.\) Besides, P is self-adjoint in \(l^{2}\left( \Gamma ,\mu \right) \).

The weight \(\mu _{xy}\) is called simple if \(\mu _{xy}=1\) for all \( x\sim y\). In this case, \(\mu \left( x\right) =\deg \left( x\right) \) and

$$\begin{aligned} Pf\left( x\right) =\frac{1}{\deg \left( x\right) }\sum _{y\sim x}f\left( y\right) . \end{aligned}$$

For any \(s\in {\mathbb {Z}}_{+}\) the power \(P^{s}\) is well defined, and the sequence \(\left\{ P^{s}\right\} _{s\ge 0}\) is a reversible Markov chain on \( \Gamma \). It is easy to see that

$$\begin{aligned} P^{s}f\left( x\right) =\sum _{y\in \Gamma }q_{s}\left( x,y\right) f\left( y\right) \mu \left( y\right) , \end{aligned}$$

where the function \(q_{s}\left( x,y\right) =q_{s}^{\Gamma }\left( x,y\right) \) is defined inductively by \(q_{0}\left( x,y\right) =\frac{1}{\mu \left( y\right) }\delta _{x,y},\)

$$\begin{aligned} q_{1}\left( x,y\right) =\frac{\mu _{xy}}{\mu \left( x\right) \mu \left( y\right) }\ \ \text {and }q_{s+1}\left( x,y\right) =\sum _{z\in \Gamma }q_{s}\left( x,z\right) q_{1}\left( z,y\right) \mu \left( z\right) . \end{aligned}$$

The function \(q_{s}\left( x,y\right) \) is called the discrete time heat kernel or the transition density of the Markov chain \(\left\{ P^{s}\right\} .\)

2.2 Product of Regular Graphs

A graph \(\Gamma \) is called d-regular if any vertex has exactly d neighbors, that is, \(\deg \left( x\right) =d\) for all \(x\in \Gamma \).

Let \(\left\{ \Gamma _{j}\right\} _{j=1}^{n}\) be a finite sequence of graphs. Consider their Cartesian product

$$\begin{aligned} \Gamma =\Gamma _{1}\Box \Gamma _{2}\Box ...\Box \Gamma _{n}. \end{aligned}$$

The vertices of \(\Gamma \) are n-tuples \(x=\left( x_{1},...x_{n}\right) \) where \(x_{j}\in \Gamma _{j}\). We write for some \(j=1,...,n\)

$$\begin{aligned} x\overset{\Gamma _{j}}{\sim }y \end{aligned}$$

if

$$\begin{aligned} x_{j}\sim y_{j}\ \text {and }x_{k}=y_{k}\text { for all }k\ne j. \end{aligned}$$

The edges \(x\sim y\) in \(\Gamma \) are defined by the following rule:

$$\begin{aligned} x\sim y\Leftrightarrow x\overset{\Gamma _{j}}{\sim }y\ \text {for some } j=1,...,n. \end{aligned}$$
(2.1)

Assume further that each \(\Gamma _{j}\) is \(d_{j}\)-regular. Then \(\Gamma \) is d-regular with

$$\begin{aligned} d=d_{1}+...+d_{n}. \end{aligned}$$

Let us endow all the graphs \(\Gamma _{j}\) and \(\Gamma \) with a simple weight. We have then for the Markov operator \(P_{\Gamma }\) on \(\Gamma \)

$$\begin{aligned} P_{\Gamma }f\left( x\right) =\frac{1}{d}\sum _{y\sim x}f\left( y\right) = \frac{1}{d}\sum _{j=1}^{n}\sum _{y\overset{\Gamma _{j}}{\sim }x}f\left( y\right) . \end{aligned}$$

Let us consider the Markov operator \(P_{\Gamma _{j}}\) on \(\Gamma _{j}\) as acting also on functions \(f\left( x\right) \) on \(\Gamma \) along the component \(x_{j},\) so that

$$\begin{aligned} P_{\Gamma _{j}}f\left( x\right) =\frac{1}{d_{j}}\sum _{y\overset{\Gamma _{j}}{ \sim }x}f\left( y\right) . \end{aligned}$$

It follows that

$$\begin{aligned} d\,P_{\Gamma }f\left( x\right) =\sum _{j=1}^{n}\sum _{y\overset{\Gamma _{j}}{ \sim }x}f\left( y\right) =\sum _{j=1}^{n}d_{j}P_{\Gamma _{j}}f\left( x\right) . \end{aligned}$$

Since all the operators \(P_{\Gamma _{j}}\) commute on \(\Gamma \), we obtain that, for any \(s\in {\mathbb {Z}}_{+}\),

$$\begin{aligned} d^{s}P_{\Gamma }^{s}=\left( \sum _{j=1}^{n}d_{j}P_{\Gamma _{j}}\right) ^{s}=\sum _{\begin{array}{c} \left( s_{1},...,s_{n}\right) \in {\mathbb {Z}}_{+}^{n} \\ s_{1}+...+s_{n}=s \end{array}}\left( {\begin{array}{c}s\\ s_{1},...,s_{n}\end{array}}\right) \prod _{j=1}^{n}d_{j}^{s_{j}}P_{\Gamma _{j}}^{s_{j}}, \end{aligned}$$
(2.2)

where \(\left( {\begin{array}{c}s\\ s_{1},...,s_{n}\end{array}}\right) =\frac{s!}{s_{1}!...s_{n}!}\) is a multinomial coefficient. Since

$$\begin{aligned} P_{\Gamma }^{s}f\left( x\right) =\sum _{y\in \Gamma }dq_{s}^{\Gamma }\left( x,y\right) f\left( y\right) , \end{aligned}$$

it follows that

$$\begin{aligned} d^{s+1}q_{s}^{\Gamma }\left( x,y\right) =\sum _{\begin{array}{c} \left( s_{1},...,s_{n}\right) \in {\mathbb {Z}}_{+}^{n} \\ s_{1}+...+s_{n}=s \end{array}}\left( {\begin{array}{c}s \\ s_{1},...,s_{n}\end{array}}\right) \prod _{j=1}^{n}d_{j}^{s_{j}+1}q_{s_{j}}^{\Gamma _{j}}\left( x_{j},y_{j}\right) . \end{aligned}$$
(2.3)

2.3 Quotient of Graphs

Let \(\left( \Gamma ,\mu \right) \) be a weighted graph with \(\mu \left( x\right) >0\) so that the Markov operator \(P_{\Gamma }\) is well defined. Let G be a group of weighted graph automorphisms of \(\Gamma \), that is,

$$\begin{aligned} \mu _{gx,gy}=\mu _{x,y}\ \ \forall g\in G,\forall x,y\in \Gamma . \end{aligned}$$

Then the vertex weight \(\mu \left( x\right) \) is also G-invariant. It follows that the operator \(P_{\Gamma }\) commutes with G, that is,

$$\begin{aligned} P_{\Gamma }\left( f\circ g\right) =\left( P_{\Gamma }f\right) \circ g, \end{aligned}$$

because

$$\begin{aligned} \left( P_{\Gamma }f\right) \circ g\left( x\right)&=\frac{1}{\mu \left( gx\right) }\sum _{y\in \Gamma }f\left( y\right) \mu _{gx,y} \\&=\frac{1}{\mu \left( x\right) }\sum _{y\in \Gamma }f\left( y\right) \mu _{x,g^{-1}y} \\&=\frac{1}{\mu \left( x\right) }\sum _{z\in \Gamma }f\left( gz\right) \mu _{x,z} \\&=P_{\Gamma }\left( f\circ g\right) \left( x\right) . \end{aligned}$$

Consequently, also \(q_{s}\left( x,y\right) \) commutes with G, that is,

$$\begin{aligned} q_{s}\left( x,y\right) =q_{s}\left( gx,gy\right) \ \ \forall g\in G. \end{aligned}$$

Consider the quotient \(Q=\Gamma /G\) that consists of the equivalence classes \(\left[ x\right] \) of vertices \(x\in \Gamma \) under the equivalent relation

$$\begin{aligned} x\equiv y\mathop {\textrm{mod}}\nolimits G\ \ \Leftrightarrow x=gy\ \ \text {for some }g\in G. \end{aligned}$$

The quotient Q has a natural weight:

$$\begin{aligned} \mu _{\left[ x\right] ,\left[ y\right] }^{Q}:=\sum _{g\in G}\mu _{x,gy}, \end{aligned}$$
(2.4)

so that \(\left( Q,\mu ^{Q}\right) \) is a weighted graph. For example, if the weight \(\mu _{xy}\) on \(\Gamma \) is simple then

$$\begin{aligned} \mu _{\left[ x\right] ,\left[ y\right] }^{Q}=\mathop {\textrm{card}}\nolimits \left\{ g\in G:x\sim gy\right\} . \end{aligned}$$

However, the weight \(\mu ^{Q}\) may be not simple because the G-orbit of y may have more than 1 vertex adjacent to x.

Observe that always

$$\begin{aligned} \mu \left( \left[ x\right] \right) =\mu \left( x\right) \end{aligned}$$
(2.5)

because

$$\begin{aligned} \mu \left( \left[ x\right] \right) =\sum _{\left[ y\right] \in Q}\mu _{\left[ x\right] ,\left[ y\right] }=\sum _{\left[ y\right] \in Q}\sum _{g\in G}\mu _{x,gy}=\sum _{z\in \Gamma }\mu _{x,z}=\mu \left( x\right) . \end{aligned}$$

Any G-periodic function f on \(\Gamma \) can be regarded as a function on Q by

$$\begin{aligned} f\left( \left[ x\right] \right) =f\left( x\right) . \end{aligned}$$

Clearly, \(P_{\Gamma }f\) is also G-periodic. Let us verify that

$$\begin{aligned} P_{Q}f\left( \left[ x\right] \right) =P_{\Gamma }f\left( x\right) . \end{aligned}$$
(2.6)

Indeed, we have

$$\begin{aligned} P_{Q}f\left( \left[ x\right] \right)&=\frac{1}{\mu \left( \left[ x\right] \right) }\sum _{\left[ y\right] \in Q}f\left( \left[ y\right] \right) \mu _{ \left[ x\right] ,\left[ y\right] } \\&=\frac{1}{\mu \left( x\right) }\sum _{\left[ y\right] \in Q}f\left( y\right) \sum _{g\in G}\mu _{x,gy} \\&=\frac{1}{\mu \left( x\right) }\sum _{z\in \Gamma }f\left( z\right) \mu _{xz} \\&=P_{\Gamma }f\left( x\right) . \end{aligned}$$

Lemma 2.1

We have for all \(x,y\in \Gamma \) and \(s\in {\mathbb {Z}}_{+}\)

$$\begin{aligned} q_{s}^{Q}\left( \left[ x\right] ,\left[ y\right] \right) =\sum _{g\in G}q_{s}^{\Gamma }\left( x,gy\right) . \end{aligned}$$
(2.7)

Proof

Clearly, the right hand side of (2.7) is G-periodic in x and y and, hence, can be regarded as a function on \(Q\times Q\). For any G -periodic function f on \(\Gamma \), we have by (2.6)

$$\begin{aligned} P_{Q}^{s}f\left( \left[ x\right] \right)&=P_{\Gamma }^{s}f\left( x\right) =\sum _{z\in \Gamma }q_{s}^{\Gamma }\left( x,z\right) f\left( z\right) \mu \left( z\right) \\&=\sum _{g\in G}\sum _{\left[ y\right] \in Q}q_{s}^{\Gamma }\left( x,gy\right) f\left( gy\right) \mu \left( gy\right) \\&=\sum _{\left[ y\right] \in Q}\sum _{g\in G}q_{s}^{\Gamma }\left( x,gy\right) f\left( y\right) \mu \left( y\right) \\&=\sum _{\left[ y\right] \in Q}\left( \sum _{g\in G}q_{s}^{\Gamma }\left( x,gy\right) \right) f\left( \left[ y\right] \right) \mu \left( \left[ y \right] \right) \end{aligned}$$

whence (2.7) follows. \(\square \)

In what follows we simplify notation by writing x instead of \(\left[ x \right] \) when this does not cause confusion.

2.4 The Heat Kernel on \({\mathbb {Z}}^{n}\)

It is known that the transition density \(q_{s}^{{\mathbb {Z}}}\left( x,y\right) \) of a simple random walk on \({\mathbb {Z}}\) is given by

$$\begin{aligned} q_{s}^{{\mathbb {Z}}}\left( x,y\right) =\left\{ \begin{array}{ll} \frac{1}{2^{s+1}}\left( {\begin{array}{c}s\\ \frac{s-k}{2}\end{array}}\right) , &{} s\ge k\text { and }s\equiv k~ \mathop {\textrm{mod}}\nolimits 2, \\ 0, &{} \text {otherwise,} \end{array} \right. \end{aligned}$$
(2.8)

where \(k=\left| x-y\right| \) (see [6, Eq.(5.6)]). Let us determine \(q_{s}^{{\mathbb {Z}}^{n}}\left( x,y\right) .\) By (2.3 ), we have

$$\begin{aligned} \left( 2n\right) ^{s+1}q_{s}^{{\mathbb {Z}}^{n}}\left( x,y\right) =\sum _{s_{1}+...+s_{n}=s}\frac{s!}{s_{1}!...s_{n}!}2^{s_{1}+1}q_{s_{1}}^{ {\mathbb {Z}}}\left( x_{1},y_{1}\right) \dots 2^{s_{n}+1}q_{s_{n}}^{{\mathbb {Z}} }\left( x_{n},y_{n}\right) . \end{aligned}$$

Setting

$$\begin{aligned} k_{i}=\left| x_{i}-y_{i}\right| , \end{aligned}$$

we obtain

$$\begin{aligned} \left( 2n\right) ^{s+1}q_{s}^{{\mathbb {Z}}^{n}}\left( x,y\right)&=\sum _{s_{1}+...+s_{n}=s}\frac{s!}{s_{1}!...s_{n}!}\prod _{i=1}^{n}\frac{ s_{i}!}{\left( \frac{s_{i}-k_{i}}{2}\right) !\left( \frac{s_{i}+k_{i}}{2} \right) !} \\&=\sum _{s_{1}+...+s_{n}=s}s!\prod _{i=1}^{n}\frac{1}{\left( \frac{ s_{i}-k_{i}}{2}\right) !\left( \frac{s_{i}+k_{i}}{2}\right) !}, \end{aligned}$$

where the summation indices \(s_{1},...,s_{n}\) satisfy in addition

$$\begin{aligned} s_{i}\ge k_{i}\text { and }s_{i}\equiv k_{i}~\mathop {\textrm{mod}}\nolimits 2. \end{aligned}$$

Changing \(j_{i}=\frac{s_{i}-k_{i}}{2}\), setting \(j=\left( j_{1},...,j_{n}\right) \), \(k=\left( k_{1},...,k_{n}\right) \), and using the multiindex notation

$$\begin{aligned} \left| j\right| =\sum _{i=1}^{n}j_{i}\ \ \ \text {and } j!=\prod _{i=1}^{n}j_{i}\ , \end{aligned}$$

we obtain

$$\begin{aligned} q_{s}^{{\mathbb {Z}}^{n}}\left( x,y\right) =\frac{1}{\left( 2n\right) ^{s+1}} \sum _{\left\{ j\in {\mathbb {Z}}_{+}^{n}:\ 2\left| j\right| +\left| k\right| =s\right\} }\frac{s!}{j!\left( k+j\right) !}. \end{aligned}$$
(2.9)

2.5 Heat Kernels on Discrete Tori

Let us fix some integer valued \(n\times n\) matrix M with

$$\begin{aligned} m:=\det M>1. \end{aligned}$$

We regard \(M{\mathbb {Z}}^{n}\) as an additive group that acts on \({\mathbb {Z}} ^{n} \) by shifts. Consider a discrete torus

$$\begin{aligned} T={\mathbb {Z}}^{n}/M{\mathbb {Z}}^{n} \end{aligned}$$
(2.10)

that is a finite graph with m vertices.

Let \(\mu \) be the weight on T that comes from the simple weight of \( {\mathbb {Z}}^{n}\) by (2.4). By (2.5), we have

$$\begin{aligned} \mu \left( x\right) =2n\ \ \text {for any }x\in T. \end{aligned}$$

By (2.7), the heat kernel on \(\left( T,\mu \right) \) is given by

$$\begin{aligned} q_{s}^{T}\left( x,y\right) =\sum _{v\in M{\mathbb {Z}}^{n}}q_{s}^{{\mathbb {Z}} ^{n}}\left( x+v,y\right) . \end{aligned}$$

Using (2.9) and setting \(x=y\), we obtain

$$\begin{aligned} q_{s}^{T}\left( x,x\right) =\sum _{v\in M{\mathbb {Z}}^{n}}q_{s}^{{\mathbb {Z}} ^{n}}\left( x+v,x\right) =\frac{1}{\left( 2n\right) ^{s+1}}\sum _{v\in M {\mathbb {Z}}^{n}}\sum _{\begin{array}{c} j\in {\mathbb {Z}}_{+}^{n} \\ 2\left| j\right| +\left| v\right| =s \end{array}}\frac{s!}{j!\left( \overline{v} +j\right) !}. \end{aligned}$$
(2.11)

3 Trigonometric Sums

3.1 Eigenfunctions on Discrete Tori

The following function is an eigenfunction of \(P_{{\mathbb {Z}}^{n}}\) for any \( w\in {\mathbb {R}}^{n}\):

$$\begin{aligned} f_{w}\left( x\right) =e^{2\pi i\langle w,x\rangle }. \end{aligned}$$

Indeed, we have

$$\begin{aligned} P_{{\mathbb {Z}}^{n}}f_{w}\left( x\right)&=\frac{1}{2n}\sum _{y\sim x}f_{w}\left( y\right) =\frac{1}{2n}\sum _{k=1}^{n}\left( f_{w}\left( x+e_{k}\right) +f_{w}\left( x-e_{k}\right) \right) \\&=\frac{1}{2n}e^{2\pi i\langle w,x\rangle }\sum _{k=1}^{n}\left( e^{2\pi i\langle w,e_{k}\rangle }+e^{-2\pi i\langle w,e_{k}\rangle }\right) =\left( \frac{1}{n}\sum _{k=1}^{n}\cos 2\pi w_{k}\right) f_{w}\left( x\right) , \end{aligned}$$

where \(\left\{ e_{k}\right\} \) is a canonical basis in \({\mathbb {R}}^{n}\). Hence, we obtain

$$\begin{aligned} P_{{\mathbb {Z}}^{n}}f_{w}=\alpha _{w}f_{w} \end{aligned}$$

with

$$\begin{aligned} \alpha _{w}=\frac{1}{n}\sum _{k=1}^{n}\cos 2\pi w_{k}. \end{aligned}$$
(3.1)

Note that the functions \(f_{w^{\prime }}\) and \(f_{w^{\prime }}\) are equal if and only of \(w^{\prime }=w^{\prime \prime }\mathop {\textrm{mod}}\nolimits {\mathbb {Z}}^{n}\) so that we can assume that \(w\in {\mathbb {R}}^{n}/{\mathbb {Z}}^{n}.\) Consider a lattice

$$\begin{aligned} W:=\left( M^{*}\right) ^{-1}{\mathbb {Z}}^{n}/{\mathbb {Z}}^{n} \end{aligned}$$

and a torus (2.10).

Lemma 3.1

The function \(f_{w}\) is \(M{\mathbb {Z}}^{n}\)-periodic if and only if \(w\in W.\) Consequently, for any \(w\in W\), the function \(f_{w}\) is an eigenfunction of \( P_{T}\) with the eigenvalue (3.1). Moreover, the family \(\left\{ f_{w}\right\} _{w\in W}\) forms an orthogonal basis in \(l^{2}\left( T,\mu \right) .\)

Proof

To prove the first claim, it suffices to verify that

$$\begin{aligned} f_{w}\left( x\right) \equiv 1\ \ \text {for all }x\in M{\mathbb {Z}}^{n} \end{aligned}$$
(3.2)

if and only if \(w\in W\). If \(x=My\) and \(w=\left( M^{*}\right) ^{-1}z\) where \(y,z\in {\mathbb {Z}}^{n}\) then

$$\begin{aligned} f_{w}\left( x\right)= & {} e^{2\pi i\langle w,x\rangle }=\exp \left( 2\pi i\langle \left( M^{*}\right) ^{-1}z,My\rangle \right) \\= & {} \exp \left( 2\pi i\langle z,M^{-1}My\rangle \right) =\exp \left( 2\pi i\langle z,y\rangle \right) =1. \end{aligned}$$

If (3.2) is true, then, for all \(x=My\) with \(y\in {\mathbb {Z}}^{n}\), we have

$$\begin{aligned} \langle w,My\rangle \in {\mathbb {Z}}. \end{aligned}$$

Let the columns of M be \(u_{1},...,u_{n}\). Then for \(y=e_{k}\) we obtain \( My=u_{k}\) so that

$$\begin{aligned} \langle w,u_{k}\rangle =z_{k} \end{aligned}$$

for some \(z_{k}\in {\mathbb {Z}}\). The matrix of this linear system is \(M^{*}\), whence

$$\begin{aligned} w=\left( M^{*}\right) ^{-1}z, \end{aligned}$$

which finishes the proof of the first claim.

The fact that \(f_{w}\) is an eigenfunction of \(P_{T}\) follows from (2.6) and the fact that \(f_{w}\) is an eigenfunction of \(P_{{\mathbb {Z}} ^{n}} \) as was verified above.

Let us verify that the family \(\left\{ f_{w}\right\} _{w\in W}\) is orthogonal For all \(w^{\prime }\ne w^{\prime \prime }\), we have

$$\begin{aligned} \langle f_{w^{\prime }},f_{w^{\prime \prime }}\rangle= & {} \sum _{x\in T}f_{w^{\prime }}\left( x\right) \overline{f_{w^{\prime \prime }}\left( x\right) }\mu \left( x\right) =\sum _{x\in T}\exp \left( 2\pi i\langle w^{\prime }-w^{\prime \prime },x\rangle \right) \mu \left( x\right) \\= & {} \mathop {\textrm{ const}}\nolimits \langle f_{w},1\rangle , \end{aligned}$$

where \(w=w^{\prime }-w^{\prime \prime }\). Since w is non-zero as an element of the torus W, the eigenfunction \(f_{w}\) is orthogonal to the eigenfunction \(f_{0}=1\) because 0 is known to be a simple eigenvalue of \( P_{T}\). Hence, \(f_{w^{\prime }}\bot f_{w^{\prime \prime }}\) as claimed.

Since the family \(\left\{ f_{w}\right\} _{w\in W}\) is linearly independent and the number of elements in this family is equal to \(\det M^{*}=m\), it follows that this family forms an orthogonal basis in \(l^{2}\left( T,\mu \right) \). \(\square \)

3.2 Main Result

For any multiindex \(v=\left( v_{1},...,v_{n}\right) \in {\mathbb {Z}}^{n}\) set

$$\begin{aligned} \ \left| v\right| =\left| v_{1}\right| +...+\left| v_{n}\right| ,\ \ \overline{v}=\left( \left| v_{1}\right| ,...,\left| v_{n}\right| \right) , \end{aligned}$$

and for \(v\in {\mathbb {Z}}_{+}^{n}\) set

$$\begin{aligned} v!=v_{1}!...v_{n}!. \end{aligned}$$

As above, let us fix an integer valued \(n\times n\) matrix M with

$$\begin{aligned} m:=\det M>1. \end{aligned}$$

For any non-negative integer s, set

$$\begin{aligned} C_{s}\left( M\right) =\sum _{\begin{array}{c} v\in M{\mathbb {Z}}^{n},~z\in {\mathbb {Z}} _{+}^{n} \\ \left| v\right| +2\left| z\right| =s \end{array}}\frac{s!}{ z!\left( \overline{v}+z\right) !}. \end{aligned}$$
(3.3)

Now we can state and prove our main result.

Theorem 3.2

For the torus

$$\begin{aligned} W=\left( M^{*}\right) ^{-1}{\mathbb {Z}}^{n}/{\mathbb {Z}}^{n} \end{aligned}$$
(3.4)

and for any non-negative integer s we have

$$\begin{aligned} \sum _{w\in W}\left( \sum _{k=1}^{n}\cos 2\pi w_{k}\right) ^{s}=\frac{m}{2^{s}} C_{s}\left( M\right) . \end{aligned}$$
(3.5)

Proof

Since \(\alpha _{w}\) with \(w\in W\) are the eigenvalues of \(P_{T}\), we obtain using (2.11)

$$\begin{aligned} \sum _{w\in W}\alpha _{w}^{s}= & {} \mathop {\textrm{trace}}\nolimits P_{T}^{s}=\sum _{x\in T}q_{s}^{T}\left( x,x\right) \mu \left( x\right) \nonumber \\= & {} \frac{2nm}{\left( 2n\right) ^{s+1}}\sum _{v\in M{\mathbb {Z}}^{n}}\sum _{\begin{array}{c} j\in {\mathbb {Z}}_{+}^{n} \\ 2\left| j\right| +\left| v\right| =s \end{array}}\frac{s!}{j!\left( \overline{v}+j\right) !} \nonumber \\= & {} \frac{m}{\left( 2n\right) ^{s}}\sum _{v\in M{\mathbb {Z}}^{n}}\sum _{\begin{array}{c} j\in {\mathbb {Z}}_{+}^{n} \\ 2\left| j\right| +\left| v\right| =s \end{array}}\frac{s!}{j!\left( \overline{v}+j\right) !} \nonumber \\= & {} \frac{m}{\left( 2n\right) ^{s}}C_{s}\left( M\right) . \end{aligned}$$
(3.6)

Substituting the value of \(\alpha _{w}\) from (3.1), we obtain (3.5). \(\square \)

It is convenient to rewrite (3.3) in the form

$$\begin{aligned} C_{s}\left( M\right) =\displaystyle \sum \limits _{v\in M{\mathbb {Z}}^{n},~\left| v\right| \le s}{\mathcal {C}}_{s}\left( v\right) , \end{aligned}$$
(3.7)

where, for any \(v\in {\mathbb {Z}}^{n}\) and \(s\in {\mathbb {Z}}_{+}\),

$$\begin{aligned} {\mathcal {C}}_{s}\left( v\right) =\displaystyle \sum \limits _{\begin{array}{c} z\in {\mathbb {Z}} _{+}^{n} \\ \left| z\right| =\frac{1}{2}\left( s-\left| v\right| \right) \end{array}}\frac{s!}{z!\left( \overline{v}+z\right) !}. \end{aligned}$$
(3.8)

Observe that the numbers \({\mathcal {C}}_{s}\left( v\right) \) do not depend on M. By (3.7), the number \(C_{s}\left( M\right) \) is determined by the vertices v of the lattice \(M{\mathbb {Z}}^{n}\) lying in the \(l^{1}\)-ball in \( {\mathbb {Z}}^{n}\) of radius s (see Fig. 3).

Fig. 3
figure 3

The nodes of a lattice \(M {\mathbb {Z}}^{n}\) lying in the \(l^{1}\)-ball of radius s (shaded)

It is clear from (3.8) that

$$\begin{aligned} \text {if }\left| v\right| \not \equiv s\mathop {\textrm{mod}}\nolimits 2\ \ \text {then}\ {\mathcal {C}}_{s}\left( v\right) =0. \end{aligned}$$

Consequently, the summation in (3.7) can be restricted to those v with \(\left| v\right| =s\mathop {\textrm{mod}}\nolimits 2.\)

In the case \(n=2\) Theorem 3.2 can be reformulated as follows. By ( 3.4) we have

$$\begin{aligned} mW=m\left( M^{*}\right) ^{-1}{\mathbb {Z}}^{n}/m{\mathbb {Z}}^{n}. \end{aligned}$$

The nodes of the torus mW have integer components. Indeed, the entries of the matrix \(\left( M^{*}\right) ^{-1}\) are obtained by dividing the minors of \(M^{*}\) by \(m=\det M^{*}\), which implies that the matrix

$$\begin{aligned} {\mathcal {A}}:=m\left( M^{*}\right) ^{-1} \end{aligned}$$
(3.9)

has integer entries. Clearly, we have \(\det {\mathcal {A}}=m^{n-1}.\) In particular, if \(n=2\) then

$$\begin{aligned} \det {\mathcal {A}}=m. \end{aligned}$$

In this case, also the converse is true.

Lemma 3.3

For any \(2\times 2\) integer matrix \({\mathcal {A}}\) with \(m=\det {\mathcal {A}}>1\) , there exists an integer matrix M such that (3.9) is true.

Proof

Indeed, set

$$\begin{aligned} M=m\left( {\mathcal {A}}^{*}\right) ^{-1} \end{aligned}$$
(3.10)

so that (3.9) is satisfied. Since \(m=\det {\mathcal {A}}^{*}\), it follows that M has integer entries, which finishes the proof. \(\square \)

Now we reformulate Theorem 3.2 in the case \(n=2.\)

Corollary 3.4

For any \(2\times 2\) integer matrix \({\mathcal {A}}\) with \(m=\det {\mathcal {A}}>1\) and for any non-negative integer s, we have the identity

$$\begin{aligned} \sum _{a\in {\mathcal {A}}{\mathbb {Z}}^{2}/m{\mathbb {Z}}^{2}}\left( \cos \frac{2\pi a_{1}}{m}+\cos \frac{2\pi a_{2}}{m}\right) ^{s}=\frac{m}{2^{s}}C_{s}\left( M\right) , \end{aligned}$$
(3.11)

where \(M=m\left( {\mathcal {A}}^{*}\right) ^{-1}\) and \(C_{s}\left( M\right) \) is defined by (3.3).

Proof

Indeed, defining W by (3.4), we see that

$$\begin{aligned} w\in W\Leftrightarrow w=\frac{a}{m} \end{aligned}$$

where

$$\begin{aligned} a\in m\left( M^{*}\right) ^{-1}{\mathbb {Z}}^{n}/m{\mathbb {Z}}^{n}={\mathcal {A}} {\mathbb {Z}}^{2}/m{\mathbb {Z}}^{2}. \end{aligned}$$

Hence, (3.11) follows from (3.5). \(\square \)

3.3 An Example of Computation

Example 3.5

Consider the matrix

$$\begin{aligned} {\mathcal {A}}=\left( \begin{array}{cc} 3 &{} 1 \\ -1 &{} 2 \end{array} \right) \end{aligned}$$

with \(m=\det {\mathcal {A}}=7.\) The torus \({\mathcal {T}}_{\mathcal {A}}={\mathcal {A}} {\mathbb {Z}}^{2}/m{\mathbb {Z}}^{2}\) is shown on Fig. 1. It contains the following 7 different points

$$\begin{aligned} \left( 0,0\right) ,\ \left( 1,2\right) ,\ \left( 2,4\right) ,\ \left( 4,1\right) ,\ \left( 3,6\right) ,\ (6,5),\left( 5,3\right) . \end{aligned}$$

Hence, the sum in the left hand side of (3.11) becomes

$$\begin{aligned} \sigma _{s}&:=2^{s}+\left( \cos \frac{2\pi }{7}+\cos \frac{4\pi }{7}\right) ^{s}+\left( \cos \frac{4\pi }{7}+\cos \frac{8\pi }{7}\right) ^{s}+\left( \cos \frac{8\pi }{7}+\cos \frac{2\pi }{7}\right) ^{s} \\&\ \ \ +\left( \cos \frac{6\pi }{7}+\cos \frac{12\pi }{7}\right) ^{s}+\left( \cos \frac{12\pi }{7}+\cos \frac{10\pi }{7}\right) ^{s}+\left( \cos \frac{10\pi }{7}+\cos \frac{6\pi }{7}\right) ^{s} \end{aligned}$$

Let us compute the right hand side of (3.11). By (3.10) we have

$$\begin{aligned} M=7\left( {\mathcal {A}}^{*}\right) ^{-1}=\left( \begin{array}{cc} 2 &{} 1 \\ -1 &{} 3 \end{array} \right) . \end{aligned}$$

The lattice \(M{\mathbb {Z}}^{2}\) is shown on Fig. 2. Let us compute the coefficients \(C_{s}\left( M\right) \) for \(s=1,...,5\). One can see from Fig. 2 that

$$\begin{aligned} \left\{ v\in M{\mathbb {Z}}^{2}:\ \left| v\right| =1\ \text {or } 2\right\}&=\emptyset ,\ \ \\ \left\{ v\in M{\mathbb {Z}}^{2}:\ \left| v\right| =3\right\}&=\left\{ \pm \left( 2,-1\right) \right\} \\ \left\{ v\in M{\mathbb {Z}}^{2}:\ \left| v\right| =4\right\}&=\left\{ \pm \left( 1,3\right) \right\} \\ \left\{ v\in M{\mathbb {Z}}^{2}:\ \left| v\right| =5\right\}&=\left\{ \pm \left( 3,2\right) ,\pm \left( 1,-4\right) \right\} . \end{aligned}$$

In all the sums below we have \(v\in M{\mathbb {Z}}^{2}\) and \(z\in {\mathbb {Z}} _{+}^{2}.\) Using (3.7) and (3.8), we obtain the following:

$$\begin{aligned} C_{1}\left( M\right)&=\displaystyle \sum \limits _{\left| v\right| =1}{\mathcal {C}} _{s}\left( v\right) =0,\\ C_{2}\left( M\right)&=\sum _{\left| v\right| =0}{\mathcal {C}} _{2}\left( v\right) +\sum _{\left| v\right| =2}{\mathcal {C}}_{2}\left( v\right) \\&=\sum _{\left| v\right| =0}\displaystyle \sum \limits _{\left| z\right| =1} \frac{2!}{z!\left( \overline{v}+z\right) !}+\sum _{\left| v\right| =2}\displaystyle \sum \limits _{\left| z\right| =0}\frac{2!}{z!\left( \overline{v} +z\right) !}=\displaystyle \sum \limits _{z_{1}+z_{2}=1}\frac{2}{z!z!}=4,\ \\ C_{3}\left( M\right)&=\sum _{\left| v\right| =1}{\mathcal {C}} _{3}\left( v\right) +\sum _{\left| v\right| =3}{\mathcal {C}}_{3}\left( v\right) \ \ \\&=\sum _{\left| v\right| =3}\displaystyle \sum \limits _{\left| z\right| =0} \frac{3!}{z!\left( \overline{v}+z\right) !}=\sum _{\left| v\right| =3} \frac{6}{\overline{v}!}=2\frac{6}{2!1!}=6,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\ C_{4}\left( M\right)&=\sum _{\left| v\right| =0}{\mathcal {C}} _{4}\left( v\right) +\sum _{\left| v\right| =2}{\mathcal {C}}_{4}\left( v\right) +\sum _{\left| v\right| =4}{\mathcal {C}}_{4}\left( v\right) \\&=\displaystyle \sum \limits _{\left| z\right| =2}\frac{4!}{z!z!}+\sum _{\left| v\right| =4}\displaystyle \sum \limits _{\left| z\right| =0}\frac{4!}{z!\left( \overline{v}+z\right) !} \\&=\displaystyle \sum \limits _{z_{1}+z_{2}=2}\frac{24}{\left( z_{1}!z_{2}!\right) ^{2}} +\sum _{\left| v\right| =4}\frac{24}{\overline{v}!}=\frac{24}{\left( 1!1!\right) ^{2}}+2\frac{24}{\left( 2!0!\right) ^{2}}+2\frac{24}{1!3!}=44, \\ C_{5}\left( M\right)&=\sum _{\left| v\right| =1}{\mathcal {C}} _{4}\left( v\right) +\sum _{\left| v\right| =3}{\mathcal {C}}_{4}\left( v\right) +\sum _{\left| v\right| =5}{\mathcal {C}}_{4}\left( v\right) \\&=\sum _{\left| v\right| =3}\displaystyle \sum \limits _{\left| z\right| =1} \frac{120}{z!\left( \overline{v}+z\right) !}+\sum _{\left| v\right| =5}\displaystyle \sum \limits _{\left| z\right| =0}\frac{5!}{z!\left( \overline{v} +z\right) !} \\&=2\displaystyle \sum \limits _{z_{1}+z_{2}=1}\frac{120}{z_{1}!z_{2}!\left( z_{1}+2\right) !\left( z_{2}+1\right) !}+2\left( \frac{120}{3!2!}+\frac{120}{1!4!}\right) \ \ \ \ \ \ \ \\&=240\left( \frac{1}{3!1!}+\frac{1}{2!2!}\right) +2\left( \frac{120}{3!2!}+ \frac{120}{1!4!}\right) =130. \end{aligned}$$

By (3.11) we have

$$\begin{aligned} \sigma _{s}=\frac{7}{2^{s}}C_{s}\left( M\right) . \end{aligned}$$

Substituting the above values of \(C_{s}\left( M\right) \), we obtain

$$\begin{aligned} \sigma _{1}=2,\ \ \sigma _{2}=7,\ \ \sigma _{3}=\frac{21}{4},\ \ \sigma _{4}= \frac{77}{4},\ \ \ \sigma _{5}=\frac{455}{16}. \end{aligned}$$