17. Euler's phi function {VeryLargeIntegers} | R Documentation |
Euler's Phi Function for vli (Very Large Integers) objects. Given a positive integer x
, the Euler's Phi Function returns the number of positive integers up to x
that are relatively prime to x
.
phi(x) ## Default S3 method: phi(x) ## S3 method for class 'numeric' phi(x) ## S3 method for class 'vli' phi(x)
x |
positive integer; object of class vli or 32 bits integer |
The returned value by the phi
function is equal to the order of the group of units of the ring Z/Zn
(the multiplicative group of integers modulo n
). It is also called Euler's Totient Function, and plays a major part in Number Theory and in the RSA Cryptosystem.
object of class vli
Javier Leiva Cuadrado
## Not run: x <- as.vli("24352") phi(x) ## End(Not run)