title: Improving trial division primality test using 6k+/-1 rule
body: <p>I was going through the basics of trial division primality test, and hence, implementing it in code. The performance of the algorithm can be increased using many tricks like:</p>
  
  <p>1) running the trial division only up to square-root(n)</p>
  
  <p>2) trading memory for time by creating a sieve up to square-root(n), and then running the trial division only on the primes in the created sieve</p>
  
  <p>But nowhere did I find the idea of returning the result as composite if the value of <code>n%6</code> (n mod 6) if found out to be <code>1 or 5</code> (using the 6k +/- 1 rule). Will using this rule in our prime number determination test not improve its performance? If yes, why hasn't it been mentioned anywhere? If no, why is it so?</p>
  
  <p>Thanks.</p>