diff --git a/Algorithms.lua b/Algorithms.lua index 9c7761e..4ef6d6e 100644 --- a/Algorithms.lua +++ b/Algorithms.lua @@ -126,7 +126,7 @@ function isPrime(possiblePrime) elseif(((possiblePrime % 2) == 0) or ((possiblePrime % 3) == 0)) then return false; end - for cnt = 5, math.sqrt(possiblePrime), 6 do + for cnt = 5, math.sqrt(possiblePrime) + 1, 6 do if(((possiblePrime % cnt) == 0) or ((possiblePrime % (cnt + 2)) == 0)) then return false; end