  The problem of diagonalization of the quantum mechanical Hamiltonian,
governing dynamics of an electron on a two-dimensional triangular or square
lattice in external uniform magnetic field, applied perpendicularly to the
lattice plane, the flux through lattice cell, divided by the elementary quantum
flux, being rational number, is reduced to generalized Bethe ansatz like
equations on high genus algebraic curve. Our formulae for the trigonometric
case, where genus of the curve vanishes, contain as a particular case recent
result of Wiegmann and Zabrodin.
