Ah, factorizing numbers quickly is considered like a very, very hard problem indeed. For mental calculation I think there is nothing more effective than checking division with every prime number up to where is the number to factorize. However you could maybe spend a couple of seconds looking at the number before and trying to see if it doesn't have some particular structure (like an obvious multiple of ), etc ... You might also like to do it the other way round : start at and go down until you reach , it can reveal useful if the number has only two prime factors that are near each other.
This is for mental calculation ; for computer calculation there are much, much more effective methods going around, that would crunch most numbers you could ever think of. But they can get quite complicated to understand if you are not familiar with algorithms.