Skip to content

Generating first n prime numbers #19118

@qalle2

Description

@qalle2

In the ntheory.generate module, there seems to be no straightforward way to generate the first n primes, equivalent to primerange(2, prime(n) + 1).

In contrast, the primorial() function supports computing the product of first n primes as well as the product of primes less than or equal to n.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions