Function reference · Algebra

pfactord

Returns the prime factors of a positive integer with their counts.

The result is a dictionary from each prime to how often it occurs.

Notation

pfactord(value)

Write it in an expression: nerdamer('pfactord(100)'), or in the Playground.

nerdamer.pfactord

nerdamer.pfactord(value: ExpressionInput): Dictionary

A method on the default import. Arguments can be strings, as in Notation.

import { pfactord }

import { pfactord } from 'nerdamer/algebra';
pfactord(value: ExpressionInput): Dictionary

Import only this function, from nerdamer/algebra.

Parameters

value
Positive integer to prime-factor.

Examples

100 is 2² · 5².

pfactord(100)
// → {2 => 2, 5 => 2}
Open in Playground

← Back to Function reference