Skip to content

Commit a708731

Browse files
committed
Update factorization.md
clarification
1 parent 0410f4c commit a708731

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/algebra/factorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ So we only need to check the numbers $5, 7, 11, 13, 17, 19, 23, \dots$.
7070
We can observe a pattern of these remaining numbers.
7171
We need to check all numbers with $d \bmod 6 = 1$ and $d \bmod 6 = 5$.
7272
So this leaves us with only $33.3\%$ percent of the numbers to check.
73-
We can implement this by checking the primes 2 and 3 first, and upon discovering they are not divisible by said numbers, check 5.
73+
We can implement this by checking the primes 2 and 3 first, and upon discovering they are not divisible by said numbers, start with 5 and only count remainders $1$ and $5$ modulo $6$.
7474

7575
Here is an implementation for the prime number 2, 3 and 5.
7676
A convenient way to store skippable numbers is with an array.

0 commit comments

Comments
 (0)