On the volume of a parallelepiped Let $P$ be a parallelepiped with all of its vertices lattice points. Define $A,B,C$ and $D$ as follows: 
$A$ = the number of lattice points  strictly inside $P$. 
$B$ = the number lattice points which are on the faces of $P$ but not on the edges.
$C$ = the number of lattice points which are on the edges of $P$ but not on the vertices. 
$D$ = the number of lattice points which are on the vertices of $P$ (i.e., the number of vertices) 
Something interesting (at least for me) that I have read somewhere recently is that the volume of $P$ is equal to $A+\frac 12B + \frac 14C + \frac 18D$. 
I can not prove it. So if you know a proof, please let me know. 
 A: The statement is true for parallelepiped. A simple way to see this is pack
$n \times n \times n$ copies of original parallelepiped into a big one.
Let $V$ be the volume of the original parallelepiped.
Let $A', B', C', D'$ and $V'$ be the corresponding number of lattice points and volume for the big parallelepiped.
Two things that are obvious are:
$$B' + C' + D' = O(n^2)\quad\quad\text{ and }\quad\quad V' = n^3 V = A' + O(n^2)$$
If you look at what contributes to $A'$, it is clear:


*

*$n^3 A$ lattice points comes from lattice points in interior of the smaller parallelepipeds.

*$\frac{n^3}{2} B + O(n^2)$ lattice points come from lattice points on faces
of smaller parallelepipeds. The factor $\frac12$ comes from the fact every faces
in the "interior" of the big parallelepiped is shared by two smaller parallelepipeds.

*$\frac{n^3}{4} C + O(n^2)$ lattice points come from lattice points on edges of
smaller parallelepipeds because every "interior" edge is shared by 4 small parallelepipeds.

*$\frac{n^3}{8} D + O(n^2)$ lattice points come from lattice points on corners of
smaller parallelepipeds.


As a result, we get
$$n^3 V = n^3 A + \frac{n^3}{2} B + \frac{n^3}{4} C + \frac{n^3}{8} D + O(n^2)$$
Divide both sides of $n^3$ and send $n \to \infty$, we obtain the formula:
$$V = A + \frac{B}{2} + \frac{C}{4} + \frac{D}{8}.$$
