17. Euler's phi function {VeryLargeIntegers}R Documentation

Euler's Phi Function for vli Objects

Description

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.

Usage

phi(x)

## Default S3 method:
phi(x)

## S3 method for class 'numeric'
phi(x)

## S3 method for class 'vli'
phi(x)

Arguments

x

positive integer; object of class vli or 32 bits integer

Details

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.

Value

object of class vli

Author(s)

Javier Leiva Cuadrado

Examples

## Not run: 
x <- as.vli("24352")
phi(x)

## End(Not run)

[Package VeryLargeIntegers version 0.2.1 Index]