TRANSACTIONS OF THE AMERICAN MATHEMATICAL SOCIETY, cilt.371, sa.9, ss.6487-6509, 2019 (SCI-Expanded)
We use the theory of Jacobi forms to study the number of elements in a maximal order of a definite quaternion algebra over the field of rational numbers whose characteristic polynomial equals a given polynomial. A certain weighted average of such numbers equals (up to some trivial factors) the Hurwitz class number H(4n-r(2)). As a consequence we obtain new proofs for Eichler's trace formula and for formulas for the class and type number of definite quaternion algebras. As a secondary result we derive explicit formulas for Jacobi Eisenstein series of weight 2 on Gamma(0)(N) and for the action of Hecke operators on Jacobi theta series associated to maximal orders of definite quaternion algebras.