<span lang="EN-US">We consider conditions of three types of stability: Lyapunov, formal and weak of a stationary solution, and of a periodic solution in a Hamiltonian system with a finite number of degrees of freedom. The conditions contain restrictions on the order of resonances and some inequalities for initial coefficients of the normal forms of the Hamiltonian functions. We show that the number-theoretical analysis of frequencies can help in proof of stability. We also estimate the orders of solutions’ divergence from the stationary or the periodic ones under lack of formal stability.</span>