Open.Numeric.Primes 2.0.0

Methods and extensions for prime number detection and discovery.

Part of the "Open" set of libraries.

Install-Package Open.Numeric.Primes -Version 2.0.0
dotnet add package Open.Numeric.Primes --version 2.0.0
<PackageReference Include="Open.Numeric.Primes" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Open.Numeric.Primes --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Open.Numeric.Primes

Methods and extensions for prime number detection and discovery.

NuGet

Examples

Importing

using Open.Numeric.Primes;

Primality Test

Number.IsPrime(8592868089022906369) // true

Factors

Prime.Factors(12) // 2, 2, 3

Common Factors

Prime.CommonFactors(84, 756, 108) // 2, 2, 3

Greatest Factor

Prime.GreatestFactor(84, 756, 108) // 12

Prime Discovery

// Will list the first 1000 primes.
foreach(var prime in Prime.Numbers.Take(1000))
{
    Console.Write(prime);
}

or

// Will list the first 1000 primes greater than (or equal to) 10,000.
foreach(var prime in Prime.Numbers.StartingAt(10000).Take(100))
{
    Console.Write(prime);
}

Open.Numeric.Primes

Methods and extensions for prime number detection and discovery.

NuGet

Examples

Importing

using Open.Numeric.Primes;

Primality Test

Number.IsPrime(8592868089022906369) // true

Factors

Prime.Factors(12) // 2, 2, 3

Common Factors

Prime.CommonFactors(84, 756, 108) // 2, 2, 3

Greatest Factor

Prime.GreatestFactor(84, 756, 108) // 12

Prime Discovery

// Will list the first 1000 primes.
foreach(var prime in Prime.Numbers.Take(1000))
{
    Console.Write(prime);
}

or

// Will list the first 1000 primes greater than (or equal to) 10,000.
foreach(var prime in Prime.Numbers.StartingAt(10000).Take(100))
{
    Console.Write(prime);
}

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Open.Numeric.Primes:

Package Downloads
DelSquared.Radicals
.NET implementation of radical expressions enabling radical expression arithmetic.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 115 8/23/2020
1.6.0 129 7/17/2020
1.5.5 287 1/4/2020
1.5.4 200 7/5/2019
1.5.3 142 7/4/2019
1.3.0 475 1/4/2018
1.2.2 401 11/4/2017
1.1.0 402 9/26/2017
1.0.1 374 9/25/2017
1.0.0 401 9/25/2017