Arithmetic and geometric mean formulas