Add mathematics--factorial algorithms