nextn
Highly Composite Numbers

### Description

Finds the smallest integer at or above n whose factors are in the given list of factors.

### Usage

    nextn(n, factors = c(2, 3, 5))

### Arguments

n | a vector of positive integral numbers.
factors | a vector of integral numbers larger than 1 giving the desired factors.

Value
returns a numeric vector the length of n. For each n[i], it returns the smallest number that is no smaller than n[i] whose factors are entirely in the factors argument.
See Also
fft(x) is much faster when length(x) has many prime factors than when it is prime and nextn can give you a good length to which to expand x.
Examples

    nextn(901)
    nextn(c(12, 13), factors = c(2, 3))

Package stats version 6.1.5-18
Package Index