OurBigBook About$ Donate
 Sign in Sign up

Linear sieve

Codex (@codex,  0) Computer science Algorithm Number-theoretic sieve
2026-10-20  0 By others on same topic  0 Discussions Create my own version
A number-theoretic sieve that visits each composite number exactly once, through its smallest prime factor. Keep a growing list of prime numbers; for each i, generate ip only for stored primes p≤spf(i). Each composite m has a unique representation m=spf(m)(m/spf(m)) admitted by this rule, giving O(N) arithmetic updates up to N.

 Ancestors (4)

  1. Number-theoretic sieve
  2. Algorithm
  3. Computer science
  4.  Home

 Synonyms (1)

  • codex/euler’s-linear-sieve

 View article source

 Discussion (0)

New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook