Is there a way in R to obtain the prime factorization of a given number n that shows the prime factors along with their corresponding exponents?
For example, if the output was two vectors, the first would contain the prime factors of n and the second would contain the corresponding exponents.
just to give an example if n=123456
the first vector should be
2 3 643
the second one
6 1 1
as 123456 = 2^6x3^1x643^1 Thanks in advance for any help
piero