Normally the answer would simple to get, a 1 letter password purely from the the alphabet is 26^1 or 26 possible answers
Here would 13^5 or 371,293 possible answers but the unique factor changes it, they'll be a set answer to this question on google somewhere.
Yup, if you could reuse the number and digits and were just typing any number of numbers/digits then you'd have 13*13*13*13*13 possible ways of doing so as you've pointed out.
The bit you've perhaps forgotten from decades ago at school is permutations and combinations.
Firstly we're not just typing digits at random, if they're not being replaced then first perhaps think about how many ways you can choose all those digits:
10 * 9 * 8 * 7 * 6 * 5* 4 * 3 * 2 * 1 (this can be written as simply 10!)
But say you're only interested in 4 digits (as we are in this problem) then you don't need the 6 * 5 * 4 * 3 * 2 * 1 (this can also be written as 6!)
we just want 10*9*8*7
10 * 9 * 8 * 7 *
6 * 5* 4 * 3 * 2 * 1
-- ----------------------------------------
6 * 5 * 4 * 3 * 2 * 1
the above could be written as 10!/6!
essentially it is 10! / (10 - 4)! as in we just want those first 4 terms of 10! i.e. 10*9*8*7
denote the number of things we have as n and number of things we're selecting as r and we now have a little formula to calculate the possible permutations:
n!
----
(n-r)!
most calculators you'd use in school etc.. have a little button for for that formula n
Pr
but we don't want permutations here, the above assumes the order is important (it might be in a digital lock but not in this case) we want the number of combinations, that is the digits selected in any order
we know that the above permutations include multiple "correct" results in a different order, if we're choosing 4 numbers then it in fact includes 4*3*2*1 versions of the correct result or 4!, written in different orders, so we can simply adjust our formula, we want to divide by r! so we now have:
n!
----
r!(n-r)!
this is what the n
Cr button does on your calculator
If you know that then the whole question can be solved in one line on your calculator, we want to choose 4 digits, any order, without replacement and then 1 of 3 possible letters, so we have: