factors
takes a number and then returns all of its factors
factors(given)
given | A integer. |
---|
A vector of numbers.
This function has the following complexity O($n^2$)
factors(1)#> [1] 1factors(123)#> [1] 1 3 41 123factors(456)#> [1] 1 2 3 4 6 8 12 19 24 38 57 76 114 152 228 456