<< even Arithmetic list_primes >>

Scilab Scholar module for schools >> Arithmetic > factorize

factorize

returns the sequence of prime factors of an integer

Calling sequence

s = factorize(n)

Arguments

n

positive integer or zero

s

sequence of numbers

Description

factorize(n) returns, in increasing order, the sequence of prime factors of n with n a positive integer or zero. If a number is a repeated prime factor of n, it is returned multiple times in the sequence.

Example

factorize(78)
factorize(89)
factorize(2^31 - 1)

See Also

<< even Arithmetic list_primes >>