Class PrimeSieve

java.lang.Object
org.episteme.core.mathematics.numbertheory.PrimeSieve

public class PrimeSieve extends Object
High-performance prime number generation using a segmented sieve. *

Reference:
Prim, R. C. (1957). Shortest connection networks and some generalizations. Bell System Technical Journal, 36(6), 1389-1401.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • PrimeSieve

      public PrimeSieve()
  • Method Details

    • segmentedSieve

      public static List<Long> segmentedSieve(long limit)
      Generates all prime numbers up to the given limit using a segmented sieve.
      Parameters:
      limit - the upper bound (inclusive)
      Returns:
      list of primes