Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

numlib::moebius

Möbius function

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

numlib::moebius(n)

Description

numlib::moebius(n) returns the value of the Möbius function at n.

numlib::moebius returns an error if the argument evaluates to a number of wrong type.

If n is a natural number numlib::moebius(n) returns the value of the Möbius function in n.

If n is not a number, numlib::moebius(n) returns the function call with its argument evaluated.

Examples

Example 1

Computing the value of the Möbius function μ at 99937:

numlib::moebius(99937)

Example 2

numlib::moebius works for arbitrarily large integers:

numlib::moebius(453973694165307953197296969697410619233826)

Parameters

n

A natural number

Return Values

numlib::moebius(n) returns a nonnegative integer.

Algorithms

Internally, ifactor is used for factoring n.

See Also

MuPAD Functions

Was this topic helpful?