Divisors: Calculate Divisors

View source: R/DescTools.r

DivisorsR Documentation

Calculate Divisors

Description

Calculate divisors of positive natural numbers.

Usage

Divisors(x)

Arguments

x

integer number for which the divisors are to be returned

Details

Divisibility is a mathematical relationship between two integers. An integer is divisible by another integer if there is no remainder in the division. The number 11 has only two divisors: 1 and the number 11 itself, whereas the number 12 has many divisors: 1, 2, 3, 4, 6 and 12. In elementary number theory, the concept of divisibility is limited to natural numbers. The number of its divisors can be determined with the function length().

Value

an integer vector containg the divisors

Author(s)

Andri Signorell <andri@signorell.net>

See Also

Primes, IsPrime, GCD, LCM

Examples

Divisors(c(145, 786))

DescTools documentation built on Sept. 26, 2024, 1:07 a.m.