numbers-package {numbers}R Documentation

Number-Theoretic Functions

Description

Provides number-theoretic functions for factorization, prime numbers, twin primes, primitive roots, modular logarithm and inverses, extended GCD, Farey series and continued fractions. Includes Legendre and Jacobi symbols, some divisor functions, Euler's Phi function, etc.

Details

The DESCRIPTION file:

Package: numbers
Type: Package
Title: Number-Theoretic Functions
Version: 0.8-5
Date: 2022-11-22
Author: Hans Werner Borchers
Maintainer: Hans W. Borchers <hwborchers@googlemail.com>
Depends: R (>= 4.1.0)
Suggests: gmp (>= 0.5-1)
Description: Provides number-theoretic functions for factorization, prime numbers, twin primes, primitive roots, modular logarithm and inverses, extended GCD, Farey series and continued fractions. Includes Legendre and Jacobi symbols, some divisor functions, Euler's Phi function, etc.
License: GPL (>= 3)

Index of help topics:

GCD                     GCD and LCM Integer Functions
Primes                  Prime Numbers
Sigma                   Divisor Functions
agm                     Arithmetic-geometric Mean
bell                    Bell Numbers
bernoulli_numbers       Bernoulli Numbers
carmichael              Carmichael Numbers
catalan                 Catalan Numbers
cf2num                  Generalized Continous Fractions
chinese                 Chinese Remainder Theorem
collatz                 Collatz Sequences
contfrac                Continued Fractions
coprime                 Coprimality
div                     Integer Division
divisors                List of Divisors
dropletPi               Droplet Algorithm for pi and e
egyptian_complete       Egyptian Fractions - Complete Search
egyptian_methods        Egyptian Fractions - Specialized Methods
eulersPhi               Eulers's Phi Function
extGCD                  Extended Euclidean Algorithm
fibonacci               Fibonacci and Lucas Series
hermiteNF               Hermite Normal Form
iNthroot                Integer N-th Root
isIntpower              Powers of Integers
isNatural               Natural Number
isPrime                 isPrime Property
isPrimroot              Primitive Root Test
legendre_sym            Legendre and Jacobi Symbol
mersenne                Mersenne Numbers
miller_rabin            Miller-Rabin Test
mod                     Modulo Operator
modinv                  Modular Inverse and Square Root
modlin                  Modular Linear Equation Solver
modlog                  Modular (or: Discrete) Logarithm
modpower                Power Function modulo m
moebius                 Moebius Function
necklace                Necklace and Bracelet Functions
nextPrime               Next Prime
numbers-package         Number-Theoretic Functions
omega                   Number of Prime Factors
ordpn                   Order in Faculty
pascal_triangle         Pascal Triangle
periodicCF              Periodic continued fraction
previousPrime           Previous Prime
primeFactors            Prime Factors
primroot                Primitive Root
pythagorean_triples     Pythagorean Triples
quadratic_residues      Quadratic Residues
ratFarey                Farey Approximation and Series
rem                     Integer Remainder
solvePellsEq            Solve Pell's Equation
stern_brocot_seq        Stern-Brocot Sequence
twinPrimes              Twin Primes
zeck                    Zeckendorf Representation

Although R does not have a true integer data type, integers can be represented exactly up to 2^53-1 . The numbers package attempts to provided basic number-theoretic functions that will work correcty and relatively fast up to this level.

Author(s)

Hans Werner Borchers

Maintainer: Hans W. Borchers <hwborchers@googlemail.com>

References

Hardy, G. H., and E. M. Wright (1980). An Introduction to the Theory of Numbers. 5th Edition, Oxford University Press.

Riesel, H. (1994). Prime Numbers and Computer Methods for Factorization. Second Edition, Birkhaeuser Boston.

Crandall, R., and C. Pomerance (2005). Prime Numbers: A Computational Perspective. Springer Science+Business.

Shoup, V. (2009). A Computational Introduction to Number Theory and Algebra. Second Edition, Cambridge University Press.

Arndt, J. (2010). Matters Computational: Ideas, Algorithms, Source Code. 2011 Edition, Springer-Verlag, Berlin Heidelberg.

Forster, O. (2014). Algorithmische Zahlentheorie. 2. Auflage, Springer Spektrum Wiesbaden.


[Package numbers version 0.8-5 Index]