Function reference · Algebra
pfactord
Returns prime factors and their occurrence counts.
pfactord(n) returns the exact prime factorization as a Dictionary whose keys are primes and whose values are their occurrence counts.
Examples
These examples use Nerdamer Notation.
Collect repeated factors into occurrence counts.
pfactord(100)
// → {2 => 2, 5 => 2}Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
pfactord(value)
Parameters
value— Positive integer to prime-factor.
nerdamer.pfactord
Call the operation through the default nerdamer import.
nerdamer.pfactord(x: ExpressionInput): Dictionary
Parameters
| Name | Type | Description |
|---|---|---|
x | ExpressionInput | — |
Returns
Direct JavaScript / TypeScript API
Import the operation directly from its package entry point.
import { pfactord } from 'nerdamer/algebra';
pfactord(x: ExpressionInput): Dictionary
Parameters
| Name | Type | Description |
|---|---|---|
x | ExpressionInput | — |
