Math 2.0

Number theory Concept

Trial division

Summary

Trial division is the simplest method to factor an integer n>1n > 1 or to test whether it is prime. It divides nn by the integers d=2,3,4,…d = 2, 3, 4, \dots in turn, and it stops at the first dd that divides nn, or when d2>nd^2 > n. If no dd with d2≤nd^2 \le n divides nn, then nn 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 dd, but a test of all integers dd is also correct. For a number nn with kk digits, the method can need about n≈10k/2\sqrt{n} \approx 10^{k/2} divisions. Thus it is slow for large nn.

Further reading

  1. Web https://en.wikipedia.org/wiki/Trial_division, Method
About this page
Tag0Z962ECCXR
URIm2://0Z962ECCXR
Kindconcept
WritingW1 stated
MSC11Y05
SpecializesPrimality test
Same as

Markdown · JSON · Edit on GitHub

What this page 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)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.