NT_OMEGA Function (Gnumeric)
Learn Gnumeric NT_OMEGA for counting distinct prime factors, with square-free divisor examples, native results and source-checked 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_OMEGA(1) gives 0 in the tested Gnumeric 1.12.57 build.
Availability and version history
- Introduced: Gnumeric 1.12.2 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_OMEGA returns
NT_OMEGA counts distinct prime factors of a positive integer. It implements the small-omega convention ω(n), not the count with repeated factors. Thus 8=2³ has one distinct prime factor, while 12=2²×3 has two. The value for 1 is zero because 1 has no prime factors. Versioned function help.
Syntax and arguments
=NT_OMEGA(n)
n is one positive integer. The implementation floors fractional input before checking the positive-integer domain.
Reproducible examples
The eight ordinary results below were independently checked using integer arithmetic.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=NT_OMEGA(1) |
0 |
=NT_OMEGA(2) |
1 |
=NT_OMEGA(8) |
1 |
=NT_OMEGA(12) |
2 |
=NT_OMEGA(30) |
3 |
=NT_OMEGA(36) |
2 |
=NT_OMEGA(97) |
1 |
=NT_OMEGA(360) |
3 |
Practical worksheet
Put positive integers in A2:A20 and enter =NT_OMEGA(A2) in B2. Grouping on B distinguishes prime powers from numbers containing several different primes. For example, 2,8 and 97 all return 1; only 2 and 97 are prime. A result of one therefore means “prime power,” not necessarily “prime.”
For 360=2³×3²×5, the native advanced formula =NT_OMEGA(8*9*5) returns 3. Counting repeated factors would instead give 3+2+1=6, which is a different arithmetic function.
Advanced interpretation and checks
A positive integer with r distinct prime factors has 2^r square-free positive divisors: choose whether to include each prime. For 360, r=3 gives 8 such divisors: 1,2,3,5,6,10,15,30. Its total number of divisors is (3+1)(2+1)(1+1)=24, so the two counts should not be confused.
For coprime a and b, ω(ab)=ω(a)+ω(b), since their prime-factor sets are disjoint. Without coprimality this sum double-counts shared primes: ω(12)=2 and ω(18)=2, but ω(216)=2 rather than 4.
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
The native table distinguishes the valid zero result at n=1 from invalid input n=0. Empty F5 behaves as zero and produces #NUM!; TRUE behaves as one and returns zero. Do not replace all errors with zero, since that would make invalid data look like the integer 1.
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_OMEGA(0) |
#NUM! |
=NT_OMEGA(-1) |
#NUM! |
=NT_OMEGA(0.9) |
#NUM! |
=NT_OMEGA(9.9) |
1 |
=NT_OMEGA("abc") |
#VALUE! |
=NT_OMEGA(F5) |
#NUM! |
=NT_OMEGA(TRUE()) |
0 |
=NT_OMEGA() |
#N/A |
=NT_OMEGA(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.