Skip to content

Commit aa7558f

Browse files
authored
fix: allow repeated primes in Goldbach pairs
1 parent 215c1f0 commit aa7558f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎maths/primelib.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def goldbach(number: int) -> list[int]:
417417
loop = True
418418

419419
while i < len_pn and loop:
420-
j = i + 1
420+
j = i
421421

422422
while j < len_pn and loop:
423423
if prime_numbers[i] + prime_numbers[j] == number:

0 commit comments

Comments
 (0)