title: Random generates number 1 more than 90% of times in parallel
body: <p>Consider the following program:</p>
  
  <pre><code>public class Program
  {
       private static Random _rnd = new Random();
       private static readonly int ITERATIONS = 5000000;
       private static readonly int RANDOM_MAX = 101;
  
       public static void Main(string[] args)
       {
            ConcurrentDictionary&lt;int,int&gt; dic = new ConcurrentDictionary&lt;int,int&gt;();
  
            Parallel.For(0, ITERATIONS, _ =&gt; dic.AddOrUpdate(_rnd.Next(1, RANDOM_MAX), 1, (k, v) =&gt; v + 1));
  
            foreach(var kv in dic)
               Console.WriteLine("{0} -&gt; {1:0.00}%", kv.Key, ((double)kv.Value / ITERATIONS) * 100);
       }
  }
  </code></pre>
  
  <p>This will print the following output:</p>
  
  <p>(<strong><em>Note that the output will vary on each execution</em></strong>)</p>
  
  <pre><code>&gt; 1 -&gt; 97,38%
  &gt; 2 -&gt; 0,03%
  &gt; 3 -&gt; 0,03%
  &gt; 4 -&gt; 0,03%
  ...
  &gt; 99 -&gt; 0,03%
  &gt; 100 -&gt; 0,03%
  </code></pre>
  
  <p>Why is the number 1 generated with such frequency?</p>