Generalized Heisenberg Algebras: periodicity and finite representation