if you are a Londoner you are familiar with the situation: When you rent a bike a machine will produce a $5$-number code made up of $\{1,2,3\}$. My friend said "oh, I had this number before", but I said it is very unlikely as there are plenty of combinations; when he asked how many, I got stuck.
So here is the difficulty: $k=5$ (number of combinations) is smaller than $n=3$. Repetition IS allowed as it can be a code of $11111$ or $12312$. The order matters as well, so the code $11112$ is not $21111$.
Any ideas how many combinations there is? Thanks!