## Task A-4.7.

By drawing lines parallel to each side, an equilateral triangle with side length $n$ is divided into $n^{2}$ equilateral triangles with side length 1. What is the maximum number of line segments of length 1 on the resulting grid that can be colored red so that no three red segments form an equilateral triangle?
Scoring: A complete solution consists of two parts: proving that we cannot color more than $n(n+1)$ segments, and an example where exactly $n(n+1)$ segments are colored and there is no equilateral triangle with all three sides red. A solution that has one but not both parts should be scored with a maximum of 6 points.

Up to 2 points can be awarded in either part for counting the number of segments parallel to one side. This claim can also be proven by counting the total number of segments through the number of triangles or by induction. If the counting is incorrect, these two points should be deducted. A correct answer without justification is worth 2 points.

If a student first proves that no more than $n(n+1)$ segments can be colored using shaded triangles as in the official solution, for the remaining 4 points it is sufficient to note that in each of these triangles any two segments can be chosen and colored red.