6. In space, there are 2017 points. The midpoints of the line segments connecting each pair of points are colored red. The minimum number of red points is
6.4031

Analysis: Consider the scenario where 2017 points are collinear and uniformly distributed on the line. It is known that in this case, the number of red points is 4031.

We now prove that for $n(n \geq 2)$ points in space, the number of red points is at least $2 n-3$.

The following proof uses mathematical induction:
(1) When $n=2$, there is clearly only one red point, so the proposition holds.
(2) Assume that the proposition holds when $n=k$, and consider the case when $n=k+1$:
When there are $k$ points in space, the number of red points is $2 k-3$. Now, add a point $P$ to the space and consider the two points $A$ and $B$ that are closest to $P$.
1. If $P, A, B$ are not collinear, then the midpoints of segments $PA$ and $PB$ must be red points, otherwise it would contradict the fact that $A$ and $B$ are the two closest points to $P$.
2. If $P, A, B$ are collinear and $A, B$ are on opposite sides of $P$, then the midpoints of segments $PA$ and $PB$ must be red points, otherwise it would contradict the fact that $A$ and $B$ are the two closest points to $P$.
3. If $P, A, B$ are collinear and $A, B$ are on the same side of $P$, then the midpoints of segments $PA$ and $PB$ must be red points, otherwise it would contradict the fact that $A$ and $B$ are the two closest points to $P$.
In summary, after adding point $P$, the number of red points increases by at least two. Therefore, when $n=k+1$, there are at least $2 k-1$ red points, and the proposition is proved.