News for hackers. Stuff that matters.
Re:The Lehmann primality test. by rohit89 on Tuesday December 20, 2011 @12:08PM (#3374167)
>> Otherwise, n is definitely composite — no fooling

This assertion is false if I understood the test correctly.

Take n = 5, a = 2.

a ^ ((n - 1) / 2) = 2 ^ ((5 - 1) / 2) = 2 ^ 2 = 4 and 4 mod 5 = 4.

Therefore the test will say 5 is composite.

Re:The Lehmann primality test. by ColinWright on Tuesday December 20, 2011 @02:32PM (#3374754)
Nope - (4 mod 5) is -1, so it passes and is not called composite.