1

I am trying to generate a unique code made up of four alphabetical letters and then digits that could have at least 4billion variations (repeat digits and letters are allowed). I would like the maximum number of letters to be four (but could be swayed if the number of digits exceeds 6) - how many digits would I have to use to get to 4 billion variations? Sorry to ask but this is way beyond me :) many thanks in advance.

At a guess I would say 26 x 26 x 26 x 26 10 x 10 x 10 x 10 giving 4.569 billion is that right? or am I way off beat

Tomo
  • 11
  • Can the letters and digits be mixed up, or all letters come first, then all digits? Also, are all combinations the same length, i.e. are the number of letters and digits per code a fixed number? – A. Thomas Yerger Aug 12 '17 at 17:36
  • That's the correct count for codes with four letters followed by six digits. (I think you meant to ask whether you were "off base", not "off beat". It's a baseball metaphor.) And be careful down the road if you want to select these at random - repeats will happen more often than you might suspect. – Ethan Bolker Aug 12 '17 at 17:38
  • Thanks Ethan - much appreciated - do you have any ideas of an easier way to save repeats? Alfred - the number of letters and digits per code will be fixed and the combinations the same length – Tomo Aug 12 '17 at 17:51

0 Answers0