Finished P047, added factor(n) function to eulerlib.py