We consider graded finitely presented algebras and modules over a field. Under some restrictions, the set of Hilbert series of such algebras (or modules) becomes finite. Claims of that types imply rationality of Hilbert and Poincare series of some algebras and modules, including periodicity of Hilbert functions of common (e.g., Noetherian) modules and algebras of linear growth.