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 April 19, 2023, 1:42 p.m.