Well, the first character can be $ {a, b, c, d, e} $: 5
The second character can be $ {a, b, c, d, e} - { \text{first character} } $: 4
The third character can be $ {a, b, c, d, e} - { \text{second character} } $: 4
…
The nth character can be $ {a, b, c, d, e} - { \text{previous character} } $: 4
$ 5 \cdot 4^{n-1} $