On a mean value formula for multiple sums over a lattice and its dual