I like to think of this it this way: To count the numbers between 5 and 18 (inclusively), we imagine all the numbers up to 18, and then we just throw away the ones we don't want, which are, of course, just the first *four* numbers. Hence, we need to subtract 4 (not 5) from 18.
That perspective makes sense. Just remove the segment you don’t want. I hadn’t thought of it that way. b - a + 1 feels second nature now, but it’s good to have another frame.
I like to think of this it this way: To count the numbers between 5 and 18 (inclusively), we imagine all the numbers up to 18, and then we just throw away the ones we don't want, which are, of course, just the first *four* numbers. Hence, we need to subtract 4 (not 5) from 18.
That perspective makes sense. Just remove the segment you don’t want. I hadn’t thought of it that way. b - a + 1 feels second nature now, but it’s good to have another frame.