On the Theory of Numbers and Generalized Quaternions