diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -15,7 +15,7 @@
 k = int((n // 2) ** (1 / 3))
 prl[0] = 2
 cur = 1
-for i in range(3, k + 1):
+for i in range(3, k + 2):
     if pr_jg(i):
         prl[cur] = i
         cur += 1
