An equilateral triangle of side $n$ is divided into equilateral triangles of side $1$.  Find the greatest possible number of unit segments with endpoints at vertices of the small triangles that can be chosen so that no three of them are sides of a single triangle.
1. **Claim**: The answer is \( n(n+1) \).

2. **Complementary Counting**: We will use complementary counting to find the minimum number of segments that can be chosen so that every unit equilateral triangle has at least one chosen edge. To minimize this number, we must choose the segments such that:
   - Each unit triangle has exactly one edge chosen.
   - As many segments as possible belong to two triangles rather than just one (so that we kill two birds with one stone).

3. **Coloring the Triangles**: Color all of the upward-facing triangles black and all of the downward-facing triangles white. There are \(\frac{n(n+1)}{2}\) black triangles and \(\frac{n(n-1)}{2}\) white triangles.

4. **Choosing Segments**: For each white triangle, choose a black triangle (not already chosen) that is adjacent to the white triangle, and choose the segment that is shared by both triangles. This gives \(\frac{n(n-1)}{2}\) segments chosen (one from each black triangle-white triangle pair).

5. **Remaining Black Triangles**: There are now \(\frac{n(n+1)}{2} - \frac{n(n-1)}{2} = n\) black triangles that do not belong to any pair. Choose one segment from each of these triangles, for a total of \(n\) additional segments. This means that \(\frac{n(n-1)}{2} + n = \frac{n(n+1)}{2}\) segments is the minimum.

6. **Total Number of Unit Segments**: Finally, it is necessary to calculate the total number of unit segments in the figure. No two black triangles share an edge, and it can be seen that all of the unit segments in the figure belong to exactly one black equilateral triangle. This means that the total number of unit segments in the figure is \(3\left(\frac{n(n+1)}{2}\right)\).

7. **Final Calculation**: The total number of unit segments is \(3\left(\frac{n(n+1)}{2}\right) = \frac{3n(n+1)}{2}\). Subtracting the minimum number of segments chosen, we get:
   \[
   \frac{3n(n+1)}{2} - \frac{n(n+1)}{2} = n(n+1)
   \]

Thus, the greatest possible number of unit segments with endpoints at vertices of the small triangles that can be chosen so that no three of them are sides of a single triangle is \( n(n+1) \).

The final answer is \( \boxed{ n(n+1) } \)