Let's say I remember there were $2$, $3$ and $4$. How can I calculate possible outcomes for my pin code? Do I use the combination with repetition formula? But since the order of the pin matters shouldn't I just use permutations?
Would the number of possibilities then be: $10\cdot 9\cdot 8\cdot 5=3600?$
We consider cases.
One digit appears three times and two other digits each appear once: In this case, the only digits that may appear in the PIN are $2$, $3$, and $4$. Choose which of them appears three times. Choose three of the five positions for that digit. The remaining two numbers can be placed in the remaining two positions in $2!$ ways.
Two digits appear twice and a third digit appears once: Again, the only digits that may appear in the PIN are $2$, $3$, and $4$. Choose which two of the three digits are repeated. Choose two of the five locations for the smaller of these two digits. Choose two of the remaining three locations for the larger of these two digits. The remaining number must be placed in the remaining position.
One digit appears twice and three other digits appear once each: Since four digits are used, there must be a digit other than $2$, $3$, and $4$. There are $10 - 3 = 7$ possibilities for this digit. Choose which of the four digits that appear in the PIN appears twice. Choose two of the five locations for that digit. The remaining three digits can be arranged in the remaining three locations in $3!$ ways.
Five digits each appear once: There are two digits other than $2$, $3$, and $4$. There are $\binom{7}{2}$ ways to select these digits and $5!$ ways to arrange the five digits in the PIN.
Since these cases are mutually exclusive and exhaustive, the desired answer can be found by adding the results of the above cases.