Added various number theoretic functions