Arithmetic properties of topological invariants of systems with nonstructurally-stable homoclinic trajectories