(p <- factorN( 423))
## [1,] 3 47
## [2,] 2 1
# meaning 423 = 3^2 * 47^1
prodN(p) # 423
is.prime(.Machine$integer.max) # TRUE
is.prime(16) # FALSE
## check speed of your machine
s <- Sys.time(); p<-primes(10^4);difftime(Sys.time(),s)
## Time difference of 2.906242 secs on my machine
x <-factorN(.Machine$integer.max)
Run the code above in your browser using DataLab