NT_MU Function (Gnumeric)
Use NT_MU in Gnumeric to calculate the Möbius function, identify square-free integers and check divisor sums, with native examples and version limits.
Verification status: 18 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Retained identities and results were checked against independent calculations. Gnumeric 1.12.62 was source-checked only. How formula examples are checked
Quick answer: =NT_MU(1) gives 1 in the tested Gnumeric 1.12.57 build.
Availability and version history
- Introduced: Gnumeric 0.57 release notes explicitly record its addition.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with its Number Theory plugin. English comma-separated formulas are shown.
- Checked: October 14, 2026. The tables and named advanced check use 1.12.57 ssconvert. Current 1.12.62 source was inspected; that release was not executed.
What NT_MU returns
NT_MU returns the Möbius value μ(n). It is zero when a prime square divides n; otherwise it is −1 for an odd number of distinct prime factors and +1 for an even number. The special case μ(1)=1 uses the empty-product convention. This is an arithmetic function, not a mean or a probability. Versioned function help.
Syntax and arguments
=NT_MU(n)
n is one positive integer. Positive fractions are floored before evaluation; validate integral input yourself when fractions indicate a data problem.
Reproducible examples
The eight ordinary results below were independently checked using integer arithmetic.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=NT_MU(1) |
1 |
=NT_MU(2) |
-1 |
=NT_MU(6) |
1 |
=NT_MU(12) |
0 |
=NT_MU(30) |
-1 |
=NT_MU(36) |
0 |
=NT_MU(97) |
-1 |
=NT_MU(210) |
1 |
Practical worksheet
For a list of positive integers in A2:A20, enter =NT_MU(A2) in B2 and fill down. Values with ABS(B2)=1 are square-free: no prime appears twice in their factorization. A zero is useful information, not an error. For example, 30=2×3×5 has μ(30)=−1, whereas 12=2²×3 has μ(12)=0.
Do not interpret −1 as “not prime.” Both a prime such as 97 and a square-free product of three distinct primes such as 30 return −1. Use a primality test for that separate question.
Advanced interpretation and checks
The independent divisor identity is Σ μ(d)=0 over all positive divisors d of any n>1. For n=12, those divisors are 1,2,3,4,6,12. The native advanced check =NT_MU(1)+NT_MU(2)+NT_MU(3)+NT_MU(4)+NT_MU(6)+NT_MU(12) returns 0: 1−1−1+0+1+0.
The function is multiplicative for coprime inputs. Since 2 and 3 are coprime, μ(6)=μ(2)μ(3)=1. Coprimality matters: μ(4)=0, while μ(2)²=1. This distinction is essential when using Möbius inversion or constructing arithmetic checks.
Version-specific source comparison
In the standard binary64 build, the 1.12.57 shared bound is 2^52 = 4503599627370496. The 1.12.62 source bound is 2^53 = 9007199254740992. The tested large-input rejection is an older-build observation; the newer range was source-checked only. An accepted number is not a guarantee that a resource-intensive prime calculation will complete.
Boundaries and troubleshooting
Zero, negative integers and positive values below one produce #NUM!. F5 is empty and is converted to zero, which is also invalid here. Text that cannot be converted to a number gives #VALUE!; an omitted required argument gives #N/A in this tested build. A returned #LIMIT! would indicate the factorization machinery could not handle an otherwise accepted request, not a Möbius value.
F5 is an actually empty cell. Errors below are the tested build’s results, not zero-valued mathematical answers.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=NT_MU(0) |
#NUM! |
=NT_MU(-1) |
#NUM! |
=NT_MU(0.9) |
#NUM! |
=NT_MU(9.9) |
0 |
=NT_MU("abc") |
#VALUE! |
=NT_MU(F5) |
#NUM! |
=NT_MU(TRUE()) |
1 |
=NT_MU() |
#N/A |
=NT_MU(9007199254740994) |
#NUM! |
Official evidence and checking scope
The retained workbook’s stale SUM cache and uncached SUM both recalculated correctly. Formula identities, typed inputs and native results were inspected. The importer reported unsupported style-extension elements; that warning is retained, and no all-formatting claim is made. GUI entry, other locales and later-release output were not tested.