numtheory/phi(deprecated) - Help

Home : Support : Online Help : numtheory/phi(deprecated)

numtheory

 phi
 totient function
 invphi
 inverse of totient function

 Calling Sequence phi(n) invphi(n)

Parameters

 n - integer

Description

 • Important: The numtheory[phi] command has been deprecated.  Use the superseding command NumberTheory[Totient] instead.
 • Important: The numtheory[invphi] command has been deprecated.  Use the superseding command NumberTheory[InverseTotient] instead.
 • The phi(n) calling sequence computes Euler's totient function of n, which is the number of positive integers not exceeding n and relatively prime to n.
 • The invphi(n) calling sequence returns a list of increasing integers [m1, m2, ..., mk] such that phi(mi) = n for i from 1 to k.
 • These functions are part of the numtheory package, and so can be used in the form phi(..) only after performing the command with(numtheory) or with(numtheory,phi) (and similarly for invphi). The functions can always be accessed in the long form numtheory[phi](..) or numtheory[invphi](..).

Examples

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{φ}\left(6\right)$
 ${2}$ (1)
 > $\mathrm{invphi}\left(\right)$
 $\left[{3}{,}{4}{,}{6}\right]$ (2)
 > $\mathrm{φ}\left(15\right)$
 ${8}$ (3)
 > $\mathrm{invphi}\left(\right)$
 $\left[{15}{,}{16}{,}{20}{,}{24}{,}{30}\right]$ (4)
 > $\mathrm{map}\left(\mathrm{φ},\right)$
 $\left[{8}{,}{8}{,}{8}{,}{8}{,}{8}\right]$ (5)
 > $\mathrm{invphi}\left(15\right)$
 $\left[{}\right]$ (6)