Given integers:
$n,a_1, a_2, ..., a_n, b_1, b_2, ..., b_n$
How many nonincreasing integer sequences $(x_1, x_2, \dots, x_n)$ of length $n$ are there subject to the bounds:
$a_1 \le x_1 \le b_1$
$a_2 \le x_2 \le b_2$
$\dots$
$a_n \le x_n \le b_n$
?
For example for:
$n = 2$
$a_1 = 4$
$b_1 = 6$
$a_2 = 3$
$b_2 = 5$
There are 8 sequences. They are:
$(4,3), (4,4), (5,3), (5,4), (5,5), (6,3), (6,4), (6,5)$