title: Fast algorithm for finding prime numbers?
body: <p>First of all - I checked a lot in this forum and I haven't found something <strong>fast enough</strong>.
  I try to make a function that returns me the prime numbers in a specified range.
  For example I did this function (in C#) using the sieve of Eratosthenes. I tried also Atkin's sieve but the Eratosthenes one runs faster (in my implementation):</p>
  
  <pre><code>public static void SetPrimesSieve(int Range)
      {
          Primes = new List&lt;uint&gt;();
          Primes.Add(2);
          int Half = (Range - 1) &gt;&gt; 1;
          BitArray Nums = new BitArray(Half, false);
          int Sqrt = (int)Math.Sqrt(Range);
          for (int i = 3, j; i &lt;= Sqrt; )
          {
              for (j = ((i * i) &gt;&gt; 1) - 1; j &lt; Half; j += i)
                  Nums[j] = true;
              do
                  i += 2;
              while (i &lt;= Sqrt &amp;&amp; Nums[(i &gt;&gt; 1) - 1]);
          }
          for (int i = 0; i &lt; Half; ++i)
             if (!Nums[i])
                  Primes.Add((uint)(i &lt;&lt; 1) + 3);
      }
  </code></pre>
  
  <p>It runs about twice faster than codes &amp; algorithms I found...
  There's should be a faster way to find prime numbers, could you help me?</p>