PrimeNu
The number of distinct prime factors of n.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Prime omega functionMathWorldDistinctPrimeFactorsWikidataQ55630466DLMF27.2.i.p1OEISA001221Wolfram LanguagePrimeNu✓PrimeNu(n)number of distinct prime factors of .SageMath
len(prime_divisors(n))SymPyprimenu(n)Juliaenumeratio_prime_nu(n)Rustprime_nu(n)Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer) -> integer | compute-engine | always |
(number | quadratic_integer, any*) -> integer | number-theoryreplaces compute-engine | always |
Details
- Counts distinct primes only -- , not 5.
- Equal to the length of FactorInteger.
- : 1 has no prime factors.
- Always , with equality exactly when is squarefree. See PrimeOmega.
Examples
Basic #
Scope #
Applications #
Properties #
Possible issues #
About
| Examples | 26 |
|---|---|
| Checked against | Wolfram Language 26 agreeSageMath 23 agreeSymPy 19 agree2 errormathlib4 20 agree3 errorJulia 21 agree1 errorRust 15 agree2 error |
| Crosswalk | WikipediaMathWorldWikidataDLMFOEISWolfram LanguageSageMathSymPyJuliaRust |
Implementation
mapped
sympypackages/oracle/src/mappings.tsprimenu counts distinct prime factors of an integer; a Gaussian integer is not one.
mapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.tsThe number of primes in the factorization.
mapped
mathlib4packages/oracle/src/mappings.tsArithmeticFunction.cardDistinctFactors, omega(n): distinct prime factors, omega(0) = 0; natural n only.
See also: PrimeOmega, FactorInteger