title: Calculating the 10001st prime number
body: <p>I want to calculate the 10001st prime number as in problem <a href="http://projecteuler.net/problem=7" rel="nofollow">7 euler project</a>. This is what I have done:</p>
  
  <pre><code>int i=0;
  int counter=2;
  while (i&lt;=10001){
      counter++;
      if (Helper.isPrime(counter))
          i++;
  }
  Helper.println(counter);
  </code></pre>
  
  <p>It is returning <code>104033</code> but the correct answer is <code>104743</code>. Where is my problem?</p>