obspy.core.util.misc.factorize_int

factorize_int(x)[source]

Calculate prime factorization of integer.

Could be done faster but faster algorithm have much more lines of code and this is fast enough for our purposes.

https://stackoverflow.com/q/14550794

>>> factorize_int(1800004)
[2, 2, 450001]
>>> factorize_int(1800003)
[3, 19, 23, 1373]