seqPrimes: Sequence of prime numbers

View source: R/RcppExports.R

seqPrimesR Documentation

Sequence of prime numbers

Description

Calculates the sequence of prime numbers.

Usage

seqPrimes(n)

Arguments

n

positive integer representing the number of sequence elements.

Value

The function returns a numeric vector containing the first n prime numbers. The current (naive) implementation of the algorithm is not efficient in terms of speed, so it is suited for low n < 10000 but requires just O(n) memory usage.

Examples

seqPrimes(10)

mnorm documentation built on April 14, 2026, 5:07 p.m.

Related to seqPrimes in mnorm...