Problem:
Consider the set of all triangles OPQ where O is the origin and P and Q are distinct points in the plane with nonnegative integer coordinates (x,y) such that 41x+y=2009. Find the number of such distinct triangles whose area is a positive integer.
Solution:
First note that the distance from (0,0) to the line 41x+y=2009 is
412+12​∣41⋅0+0−2009∣​=292​2009​
and that this distance is the altitude of any of the triangles under consideration. Thus such a triangle has integer area if and only if its base is an even multiple of 292​. There are 50 points with nonnegative integer coefficients on the given line, namely, (0,2009),(1,1968),(2,1927),…,(49,0), and the distance between any two consecutive points is 292​. Thus a triangle has positive integer area if and only if the base contains 3,5,7,…, or 49 of these points, with the two outermost points being vertices of the triangle. The number of bases with one of these possibilities is
48+46+44+⋯+2=224⋅50​=600
OR
Assume that the coordinates of P and Q are (x0​,y0​) and (x0​+k,y0​−41k), where x0​ and y0​ are nonnegative integers such that 41x0​+y0​=2009, and k is a positive integer. Then the area of △OPQ is the absolute value of
Thus the area is an integer if and only if k is a positive even integer. The points Pi​ with coordinates (i,2009−41i),0≤i≤49, represent exactly the points with nonnegative integer coordinates that lie on the line with equation 41x+y=2009. There are 50 such points. The pairs of points (Pi​,Pj​) with j−i even and j>i are in one-to-one correspondence with the triangles OPQ having integer area. Thus j−i=2p,1≤p≤24 and for each possible value of p, there are 50−2p pairs of points (Pi​,Pj​) meeting the conditions that Pi​ and Pj​ are points on 41x+y=2009 with j−i even and j>i. Thus the number of such pairs and the number of triangles OPQ with integer area is