## `numlib::lambda` -- Carmichael function

#### Introduction

`numlib::lambda``(n)` returns the value of the Carmichael function at `n`.

#### Call(s)

`numlib::lambda(n)`

#### Parameters

`n` | - | a natural number

#### Returns

`numlib::lambda``(n)` returns a natural number, or the function call with its argument evaluated.

#### Related Functions

`numlib::order`, `numlib::phi`

#### Details

- If `m` is a natural number then `numlib::lambda``(m)` returns the value of the Carmichael function in `m`, i. e., the maximal order of an element in the group of units modulo `m`.
- `numlib::lambda` returns an error if the argument evaluates to a number of wrong type. `numlib::lambda` returns the function call with its argument evaluated if `m` is not a number.

#### Example 1

We compute the value of the Carmichael function in :

    >> numlib::lambda(97)

                                        96

#### Example 2

We compute the value of the Carmichael function in :

    >> numlib::lambda(96)

                                         8

#### Background

- Internally, `ifactor` is used for factoring `n`.

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000