A non-degenerate triangle is formed by three points that are not collinear. A triangle is called nice if it is non-degenerate and its vertices have integer coordinates such that and . Let denote the number of nice isosceles triangles for which the coordinates of each vertex satisfy . Prove that
Solution
We let be the number of nice isosceles triangles for which the coordinates of all vertices satisfy and for at least one vertex we have . These triangles are part of the count for but not for . Therefore, we obtain
We remark that is also equal to the number of nice isosceles triangles for which the coordinates of all vertices satisfy and for at least one vertex we have . To see this, replace each vertex by . Let now denote the number of all nice isosceles triangles for which the coordinates of all vertices satisfy and at least one vertex has and at least one vertex has . We then have
because we can split the set of nice isosceles triangles for which the coordinates of all vertices satisfy and for at least one vertex we have (totalling to ) into the set of those for which all vertices have (giving ) and those for which at least one vertex has (giving ).
We now split the set (with elements) of all nice isosceles triangles for which the coordinates of all vertices satisfy and at least one vertex has and at least one vertex has into two subsets. One subset contains all those triangles that have a vertex with coordinates with . The number of triangles in this subset is denoted by . The other subset consists of those triangles that do not have a vertex with and its number of elements is denoted by . We then have .
The crucial observations are that does not depend on and that depends on the parity of only, provided that is large enough. We now explain why.
Consider a nice isosceles triangle that has vertices , and . Both, and , are at least and . If , we cannot have an isosceles triangle in which is one of the equal sides. Hence, we need to have and this happens exactly when . Therefore, is completely determined by and and no such exists if and differ by an odd number. This shows that does not depend on as long as .
Consider now a nice isosceles triangle with vertices , and such that . Considering the diagonal from to we see that and do not exceed . Because we also have , we obtain and as soon as . Therefore, for such , we need to have . If we let and , we get
i.e. . If , then and , hence . In case and , we even have and we obtain . However, we have and so .
This shows that we need to have and , whenever . In particular, if is odd, . If is even, is not equal to zero but does not depend on because the triangles we count are determined by the choice of and . Therefore, if , depends on the parity of only.
Because , we see now that depends on the parity of only, i.e.
The desired recurrence is now obtained as follows:
using (19)
valid for all .
Replacing by we obtain
Substituting this in the previous equation finally gives
using (21)
for all .