primes: Prime Factorization

primesR Documentation

Prime Factorization

Description

Computes the prime factorization of a composite number.

Usage

prime.factorization(x)

Arguments

x

length-1 numeric.

Details

As a side effect, tests for primality using a naive approach.

Value

A matrix of prime factors in the first column and powers in the second.

Examples

(x <- 8*9*25*7*11)
prime.factorization(x)

graywh/r-gmisc documentation built on June 12, 2025, 10:57 p.m.