Oh yeah here’s something I’ve forgotten to write: when choosing a 4 digit code for doors and such, having a duplicate digit makes it harder to guess.
Let’s say they know it’s the numbers 1, 7, 8, and 9, but not the order. That’s fewer possible codes than if they know it’s a four digit code made out of 1, 7, and 8. (Such as 8178, 7781, 1817 etc.)
To me this made intuitive sense but in conversation wih combinatorians I’ve won a lot of bets on this, resolved by them mathing it out. Two unique numbers is worse though. Three is the sweet spot for a four digit code.
Huh, I should try to put into OEIS the sequence f(n) where f(n) is the sweet spot of unique numbers for an n-digit code in base ten.
1, 2, 2, 3…