Arithmetic functions.