How do I calculate the possible number of combinations (order does not matter, repetition allowed) for $n$ items taking $1...p$ items. For Example:
Suppose there are 3 letters - $P$, $Q$ and $R$.
So, the number of combinations would be :
$1$ Item $\to3$ ($P$, $Q$ and $R$)
$2$ Items $\to6$ ($PQ$, $QR$, $RP$ $PP$, $QQ$, and $RR$)
Total $\to(3+6)$ or $9$.
Edit - It seems I am not being able to frame the question correctly. What I am trying to achieve is the total number of possible words with max length of $P$ formed with the alphabet.
- Repetition of letters allowed.
- Capitalization matters.