Sharpening "Primes is in P" for a large family of numbers
  We give Deterministic Primality tests for large families of numbers. These tests were inspired in the recent and celebrated Agrawal-Kayal-Saxena (AKS) test. The AKS test has proved polynomial complexity O ((log n)^12) and they expect it to be O ((log n)^6) . Our tests have proved complexity O ((log n)^6). The complexity decreases to O ((log n)^4) as the power of 2 dividing n + 1 or n - 1 increases. On large enough primes, our tests, in their worst case, run at least 2^9 times faster than the AKS test. 
Pedro Berrizbeitia