Skip to content

primes

Fast Functions for Prime Numbers

v1.6.1 · Feb 4, 2025 · MIT + file LICENSE

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.

Downloads

1K

Last 30 days

3798th

3.2K

Last 90 days

17.7K

Last year

Trend: -12.3% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (2)

imports

Dependency Network

Dependencies Reverse dependencies Rcpp LISTO SFDesign primes

Version History

new 1.6.1 Mar 10, 2026
updated 1.6.1 ← 1.6.0 diff Feb 3, 2025
updated 1.6.0 ← 1.5.2 diff Jan 8, 2024
updated 1.5.2 ← 1.5.1 diff Dec 18, 2023
updated 1.5.1 ← 1.5.0 diff Nov 7, 2023
updated 1.5.0 ← 1.4.0 diff Oct 7, 2023
updated 1.4.0 ← 1.1.0 diff Sep 11, 2022
updated 1.1.0 ← 1.0.0 diff Sep 2, 2020
updated 1.0.0 ← 0.2.0 diff Jul 28, 2020
updated 0.2.0 ← 0.1.0 diff Jul 26, 2020
new 0.1.0 Jun 21, 2015