title: Algorithm to generate random number of size X
body: <p>In my mobile application I have to provide the user with a random unique X alphanumeric code so that the user can reply with that alphanumeric code to perform some task.</p>
  
  <p>The number of users going to use this application is around 1 million people and the message traffic is around 0.1 million messages/day.</p>
  
  <p>I can use only 26 upper letters, 26 lower letters and 10 digits. If the random number size is 5 then I can generate 916132832 unique combinations. After the combinations get exhausted I want to recycle this number generation again.</p>
  
  <p>I am looking for an algorithmic approach. Is there any algorithmic approach to solve this problem?</p>