proper number for factor

Make sure the factor is a proper number.  Also accept factors in octal or hex notation.