sieve_primes | R Documentation |
This function implements the Sieve of Eratosthenes algorithm to find all
prime numbers up to the given positive integer n
. It returns a vector of
integers representing the prime numbers.
sieve_primes(n)
n |
A positive integer specifying the upper limit for the prime numbers. |
A numeric vector of prime numbers up to n
.
zulutils:::sieve_primes(10)
zulutils:::sieve_primes(20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.