  We provide a detailed analysis of a realization of chiral gapless edge modes
in the framework of the Hofstadter model of interacting electrons. In a
transverse homogeneous magnetic field and a rational magnetic flux through an
unit cell the fermion spectrum splits into topological subbands with
well-defined Chern numbers, contains gapless edge modes in the gaps. It is
shown that the behavior of gapless edge modes is described within the framework
of the Kitaev chain where the tunneling of Majorana fermions is determined by
effective hopping of Majorana fermions between chains. The proposed approach
makes it possible to study the fermion spectrum in the case of an irrational
flux, to calculate the Hall conductance of subbands that form a fine structure
of the spectrum. In the case of a rational flux and a strong on-site Hubbard
interaction $U$, $ U >4 \Delta $ ($ \Delta $ is a gap), the topological state
of the system, which is determined by the corresponding Chern number and chiral
gapless edge modes, collapses. When the magnitude of the on-site Hubbard
interaction changes, at the point $ U = 4 \Delta $ a topological phase
transition is realized, i.e., there are changes in the Chern numbers of two
subbands due to their degeneration.
