  We determine the number of level 1, polarized, algebraic regular, cuspidal
automorphic representations of GL_n over Q of any given infinitesimal
character, for essentially all n <= 8. For this, we compute the dimensions of
spaces of level 1 automorphic forms for certain semisimple Z-forms of the
compact groups SO_7, SO_8, SO_9 (and G_2) and determine Arthur's endoscopic
partition of these spaces in all cases. We also give applications to the 121
even lattices of rank 25 and determinant 2 found by Borcherds, to level one
self-dual automorphic representations of GL_n with trivial infinitesimal
character, and to vector valued Siegel modular forms of genus 3. A part of our
results are conditional to certain expected results in the theory of twisted
endoscopy.
