News for hackers. Stuff that matters.
Re:Ask HN: What is the largest known prime in sequence? by Someone on Wednesday February 02, 2022 @07:12PM (#30186363)
It’s even worse: to check whether a given number n is prime, you don’t need to know any prime.

If you do trial division in increasing order, you’ll find one (the smallest prime factor if n, which is n itself if n is prime), but if n is composite, you can avoid that by doing it in random order, or by starting near √n and working down (or up). That way, even if n has only two/three prime factors, you’ll find them/one of them, but that won’t tell you that they are/one of them is prime.

There are no comments on this comment yet.