numtheory[phi] - totient function
numtheory[invphi] - inverse of totient function
|
Calling Sequence
|
|
phi(n)
invphi(n)
|
|
Description
|
|
•
|
The phi(n) calling sequence computes the 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
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
|
|
Download Help Document
Was this information helpful?