Following Losik’s approach to Gelfand’s formal geometry, certain characteristic classes for codimension-one foliations coming from the Gelfand-Fuchs cohomology are considered. Sufficient conditions for nontriviality in terms of dynamical properties of generators of the holonomy groups are found. The nontriviality for the Reeb foliations is shown; this is in contrast with some classical theorems on the Godbillon-Vey class; for example, the Mizutani-Morita-Tsuboi theorem about triviality of the Godbillon-Vey class of foliations almost without holonomy is not true for the classes under consideration. It is shown that the considered classes are trivial for a large class of foliations without holonomy. The question of triviality is related to ergodic theory of dynamical systems on the circle and to the problem of smooth conjugacy of local diffeomorphisms. Certain classes are obstructions for the existence of transverse affine and projective connections.