Let h1, · · · , hn be positive integers. We study new sums m(h1, · · · , hn) = h1−1 ∑ r1=0 · · · hn−1 ∑ rn=0 min { r1 h1 , · · · , rn hn } and M(h1, · · · , hn) = h1−1 ∑ r1=0 · · · hn−1 ∑ rn=0 max { r1 h1 , · · · , rn hn } , the first of which times h1 · · ·hn is the number of lattice points in a pyramid of dimension n + 1. We show that m(h1, · · · , hn) (h1 − 1) · · · (hn − 1) = 1 + ∑ ∅6 =I⊆{1...