Use prime factorization for simplifying computations

WWW: https://cran.r-project.org/package=primefactr
