How do I calculate a specific value on this triangle array without doing it manually? https://i.stack.imgur.com/C03lM.jpg
Please no sigma notation! I've already got it, what I'm really looking for is a pretty formula like nCr that doesn't make my calculator cry.
These numbers are the ways you can place P objects in H slots, under the condition that the objects MUST be equally spaced from each other.
The points columns increase like so: (0) + 0 + 0 + 0 + 1 + 1 + 1 + 2 + 2 + 2 + 3 + 3 + 3 + 4 + 4 + 4 + 5 + 5 + 5... with the additions ticking up every (H-1) rows. This was the example for H = 4.
Here's a diagram for H = 6 and P = 3 https://i.stack.imgur.com/rWooI.png
Note that we should consider each possible spacing individually. When the spacing is 0, the block of dots take up $P$ spaces, so there are $H-(P-1)$ ways to arrange the dots. Likewise, when the spacing is 1, there are $2P-1$ spaces occupied, so $H-2(P-1)$ ways to arrange the dots.
The number of possible spaces is clearly $\lfloor\frac H{P-1}\rfloor$ so set this quantity equal to $k$. So, our formula is $$kH - \frac{k(k+1)}2\cdot(P-1)$$So, our final formula is$$\lfloor\frac H{P-1}\rfloor H - \frac{\lfloor\frac H{P-1}\rfloor(\lfloor\frac H{P-1}\rfloor+1)}2\cdot(P-1)$$
P.S. This formula fails for 1 dot as spacing doesn't matter, so our analysis fails. This case can be handled manually.
P.P.S. I generated your matrix here