We solve two related Gauss problems. In the arithmetic setting, we consider genera of maximal O-lattices, where O is the maximal order in a definite quaternion Q-algebra, and we list all cases where they have class number 1. We also prove a unique orthogonal decomposition result for more general O-lattices. In the geometric setting, we study the Siegel modular variety A g ⊗ F p of genus g, and we list all x in A g ⊗ F p for which the corresponding central leaf C (x) consists of one point, that is, such that x is the unique point in the locus consisting of the points whose associated polarised p-divisible groups are isomorphic to that of x. The solution to the second Gauss problem involves mass formulae, computations of automorphism groups, and a careful analysis of Ekedahl-Oort strata in genus g = 4.