Trial division
Summary
Trial division is the simplest method to factor an integer or to test whether it is prime. It divides by the integers in turn, and it stops at the first that divides , or when . If no with divides , then is prime.
Remarks
The method is correct because a composite number has a prime factor at most its square root. It is enough to test the primes , but a test of all integers is also correct. For a number with digits, the method can need about divisions. Thus it is slow for large .
Explanations
L1 human
To test whether is prime, try to divide it by , , and . You can stop after , because . The division by works: . So is not prime.
What this node needs for W2
- edge defines in: at least one definition (0 of 1)
- edge instance_of in: at least two examples (0 of 2)
- edge not_instance_of in: at least one non-example (0 of 1)
- edge specializes both: the more general notions and the special cases (0 of 1)
The writing levels say how complete the text of a node is. They do not measure its truth.
Sources
What links here
No node links to this node yet.