Wouldn't it depend on what actually happens when you want to input the second number on each button (I assume you press it twice)?
Case 1: Two keystrokes on the same button simply outputs two of the same digit, similar to pressing the same button twice on a single number button keypad, then the result is just a reduced number of buttons, but longer code. Instead of referring to the buttons by their numbers, you can refer to them by which button it is (i.e. button 1, button 2...... button
n). The total number of combinations as I'm sure you're aware is nl, where
l is the length of combination. Clearly l has a higher affect on the total number.
Case 2: Two keystrokes on one button outputs a single digit (the second number on the button) then the number of buttons is 10, but the length changes and is not the same as the number of inputs!
It depends on the maximum number of keystrokes allowed.
Let's say 10 keystrokes is the maximum.
5 buttons, 1 digit per keystroke, results in a length of 10.
510 = 9 765 625
5 buttons, 1 digit per 1 or 2 keystrokes, results in a maximum length of 10 and minimum of 5. But remember that you actually have 10 possible outputs.
If you use a combination that only uses the first digits of the buttons:
510 = 9 765 625 - the same!
If you use a combination that utilizes all of the second numbers only:
105 = 100 000 - much lower
So if the mechanic for creating the second number is as above, and the combination has a maximum number of keystrokes then security is lower.
But if the combination has a maximum number of digits with endless keystrokes, then the result is very different.
With a maximum of 10 digits:
Same as above:
510 = 9 765 625
Now you have 5 buttons but number of keystrokes is irrelevant so you effectively have 10 buttons.
1010 = 10 000 000 000
It may seem like much more, but this is the same as a standard 10 button (0-9) lock.
As a conclusion, I could have simply compared the final case with the standard one and said the most security you can achieve with this lock is the same as the 10 button lock. Truth is I didn't know and kind of figured this out as I wrote it! Hope it gave light to something.