I have managed to find the prime factors of a number with the following code:
library(gmp)
typ <- match_exams_device()
#--------------------------------------------------------
pipa <- as.numeric(factorize(25))
pipa
But, what I am looking for is to represent the simplified radical number. For example
be expressed as
In this case, it would be enough to obtain the factors that remain outside the radical, and then multiply them. The same procedure would be applied for the factors that give as a result the number that remains inside the radical
Thank you very much for your help

