I wish to find the number of points with integral coordinates in the first quadrant, which lie between the lines $x+y = a$, and $x+y=b$. It is given that $a<b$, $a$ and $b$ are positive integers.
Is there an approach to do this without manually counting the number of points - that is, by finding a certain closed form expression for the required quantity?
Please help me find the closed form expression in terms of $a$ and $b$, for the number of lattice points satisfying the above required conditions.
Hint: Let $N(t)$ be number of lattice points $(x,y)$ in the first quadrant such that $x+y \le t$. Then consider $N(b)-N(a)$. Adjust as needed.