get_all_factors
finds all factor pairs for a given integer (i.e. a number
that divides evenly into another number).
get_all_factors(n)
n | number to be factored |
---|
http://stackoverflow.com/a/6425597/3851274
A list containing the integer vector(s) containing all factors for the given
n
inputs.
# Find all the factors of 39304 get_all_factors(39304)#> $`39304` #> [1] 1 2 4 8 17 34 68 136 289 578 1156 2312 #> [13] 4913 9826 19652 39304 #>