We have a rectangular shape with the size n × m meters is divided into rectangles of size 1 × 1 meters.
- Question: Sum of the area of all the rectangles that can be seen in that rectangular is how much?
Example for n=1, m=2:
$$
\text{Sum of areas}=a_{1,1}+a_{1,2}=2+2=4
$$
I think the answer is
$${n+2\choose 3}\cdot{m+2\choose 3}\ $$
but I'm not sure. please answer this question if you can prove it.
Consider a rectangle $i\times j$ oriented as the original $n\times m$ rectangle. We can place its upper left corner in any square of a $(n-i+1)\times(m-j+1)$ rectangle, so the sum of all the areas is $$ \sum_{i=1}^{n}\sum_{j=1}^{m} ij(n-1+1)(m-j+1) = \left(\sum_{i=1}^{n}i(n-i+1)\right)\cdot\left(\sum_{j=1}^{m}j(m-j+1)\right).$$ Now we have $$\sum_{i=1}^{n}i(n-i+1)=(n+2)\sum_{i=1}^{n}\binom{i}{1}-2\sum_{i=1}^{n}\binom{i+1}{2}=(n+2)\binom{n+1}{2}-2\binom{n+2}{3};$$ on the other hand: $$(n+2)\binom{n+1}{2}-2\binom{n+2}{3}=3\binom{n+2}{3}-2\binom{n+2}{3}=\binom{n+2}{3},$$ so all the areas sum up to $$\binom{n+2}{3}\cdot\binom{m+2}{3}$$ as claimed.