Problem

Source: China Mathematical Olympiad 1994 problem6

Tags: analytic geometry, geometry, incenter, combinatorics unsolved, combinatorics



Let $M$ be a point which has coordinates $(p\times 1994,7p\times 1994)$ in the Cartesian plane ($p$ is a prime). Find the number of right-triangles satisfying the following conditions: (1) all vertexes of the triangle are lattice points, moreover $M$ is on the right-angled corner of the triangle; (2) the origin ($0,0$) is the incenter of the triangle.