Alright, so I've been working through a couple combinatorics problems and I'm having trouble understanding the underlying reason for why a formula is written in a certain way. So here's the problem:
Suppose that r flags of different colors are to be displayed on n poles in a row. In how many ways can this be done?
Now this problem was solved by basically treating each flag like a divider and every time you place a flag, you create $n+1$ more choices of position for the next flag to placed which makes total sense. The final answer then is: $n(n+1)(n+2)...(n+r-1)$
What I'm confused about is how to know that $(n+r-1)$ always gives the final number of choices. I drew out a sample case and it does work out but I'm not sure why. This type of formula ending comes up a lot and I really want to understand how it works and when it applies.