title: Generating random numbers effectively
body: <p>How do you generate random numbers effectively?<br />
  Every time a random number program boots up, it starts spitting same numbers as before. (I guess because of quasi nature of random number generation)<br />
  Is there a way, that random# generation becomes non-deterministic? sort of Entropy addition to generation that number generated after boot is in different sequence than last one. (random random rather that quasi-random)<br />
  Also, say range of such generation is (m,n) such that n-m = x, is there a chance that a number say 'p' appears next time after x-1 other numbers have been generated. But next lot of such x numbers would not be same as sequence from last one. Example:<br />
  <strong>range: 1,5. Generation : 2,4,5,1,3 (1st) 4,2,3,1,5 (2nd)...</strong> same numbers.<br />
  I out of nonplussed state of mind wrote this :<br /></p>
  
  <pre><code>int num1 = (rand.Next(1, 440) *31* (int)DateTime.Now.Ticks *59* (DateTime.Now.Second * 100) % 439) + 1;
  int num2 = (rand.Next(1, 440) *31* (int)DateTime.Now.Ticks *59* (DateTime.Now.Second * 100) % 439) + 1;
  </code></pre>
  
  <p>here range was (1,440). but it still generates numbers out of bound and zero, and it's frequency is not that great either. It is C#.NET code. Why so?
  <br />
  your answers can be language agnostic / algorithmic / analytical. Thanks in advance.</p>