From 88c6071f5728fd1a113ae5df9002a61ecedf0d0c Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Thu, 1 Jul 2021 00:22:22 -0400 Subject: [PATCH] Fixed possible bug --- Algorithms.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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