Let A be the set of all triangles whose lengths of sides are integers and whose perimeter is $2013$. Let B be the set of all triangles whose lengths of sides are integers and perimeter is $2016$. Which of the two sets has more elements (triangles). Explain it in details.
What I tried:
I couldn't count the number of triangles for both sets. Supposing that triangles exist they must comply with the triangle inequality. According to the triangle inequality for set A the sides of the triangles are from 1 to 1006, for set B the sides of the triangles are from 2 to 1007. In both cases the possible length side values are 1006.
Can somebody give me an idea?
Hint: categorize the triangles by the longest side. For a perimeter of $2016$ the longest side cannot be longer than $1007$ because the triangle inequality will fail. It can't be shorter than $672$ because another side will be longer. If I tell you the longest side is $1234$ how many triangles can you form? Find the rule for the number given the longest side and add up the results for longest sides from $672$ to $1007$