Other packages > Find by keyword >

primes  

Fast Functions for Prime Numbers
View on CRAN: Click here


Download and install primes package within the R console
Install from CRAN:
install.packages("primes")

Install from Github:
library("remotes")
install_github("cran/primes")

Install by package version:
library("remotes")
install_version("primes", "1.6.1")



Attach the package and use:
library("primes")
Maintained by
Os Keyes
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2015-06-22
Latest Update: 2025-02-04
Description:
Fast functions for dealing with prime numbers, such as testing whether a number is prime and generating a sequence prime numbers. Additional functions include finding prime factors and Ruth-Aaron pairs, finding next and previous prime numbers in the series, finding or estimating the nth prime, estimating the number of primes less than or equal to an arbitrary number, computing primorials, prime k-tuples (e.g., twin primes), finding the greatest common divisor and smallest (least) common multiple, testing whether two numbers are coprime, and computing Euler's totient function. Most functions are vectorized for speed and convenience.
How to cite:
Os Keyes (2015). primes: Fast Functions for Prime Numbers. R package version 1.6.1, https://cran.r-project.org/web/packages/primes. Accessed 05 Jun. 2026.
Previous versions and publish date:
0.1.0 (2015-06-22 19:53), 0.2.0 (2020-07-27 01:00), 1.0.0 (2020-07-29 01:00), 1.1.0 (2020-09-03 08:40), 1.4.0 (2022-09-12 13:50), 1.5.0 (2023-10-08 19:40), 1.5.1 (2023-11-08 10:50), 1.5.2 (2023-12-19 02:20), 1.6.0 (2024-01-09 01:40)
Other packages that cited primes R package
View primes citation profile
Other R packages that primes depends, imports, suggests or enhances
Complete documentation for primes
Functions, R codes and Examples using the primes R package
Some associated functions: gcd . generate_primes . is_prime . k_tuple . next_prime . nth_prime . phi . prime_count . prime_factors . primes . primorial . ruth_aaron_pairs . 
Some associated R codes: RcppExports.R . data.R . gcd.R . k_tuple.R . phi.R . prime_count.R . primes-package.R . primorial.R . ruth_aaron_pairs.R . sieve.R .  Full primes package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

crossurr  
Cross-Fitting for Doubly Robust Evaluation of High-Dimensional Surrogate Markers
Doubly robust methods for evaluating surrogate markers as outlined in: Agniel D, Hejblum BP, Thiebau ...
Download / Learn more Package Citations See dependency  
ibb  
R Wrapper for Istanbul Municipality Open Data Portal
Call wrappers for Istanbul Metropolitan Municipality's Open Data Portal (Turkish: Istanbul B ...
Download / Learn more Package Citations See dependency  
msm  
Multi-State Markov and Hidden Markov Models in Continuous Time
Functions for fitting continuous-time Markov and hidden Markov multi-state models to longitudinal d ...
Download / Learn more Package Citations See dependency  
quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
envirem  
Generation of ENVIREM Variables
Generation of bioclimatic rasters that are complementary to the typical 19 bioclim variables. ...
Download / Learn more Package Citations See dependency  

27,268

R Packages

233,548

Dependencies

72,590

Author Associations

27,205

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA