  We compute Hochschild homology and cohomology of a class of generalized Weyl
algebras (for short GWA, defined by Bavula in St.Petersbourg Math. Journal 1999
4(1) pp. 71-90). Examples of such algebras are the n-th Weyl algebras, U(sl_2),
primitive quotients of U(sl_2), and subalgebras of invariants of these algebras
under finite cyclic groups of automorphisms. We answer a question of Bavula -
Jordan (Trans. A.M.S. 353 (2) 2001 pp. 769 -794) concerning the generator of
the group of automorphism of a GWA. We also explain previous results on the
invariants of Weyl algebras and of primitive quotients.
