This function uses the Sieve of Eratosthenes to find all the primes less than or equal to a given integer.
Identified primes (empty vector for initialization)
The function assumes that unsieved is a vector of positive integers.
Returns a vector of primes sieved (selected) from the input vector.
Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.