6. (20 points) Divide 23 cards, each with a number from 1 to 23, into three piles. It is known that the average numbers of the three piles are 13, 4, and 17, respectively. How many cards are there at least in the pile with an average of 13?

【Analysis】According to the problem, let the piles with averages of $13$, $4$, and $17$ have $a$, $b$, and $c$ cards, respectively, then: $a+b+c=23$,
$13 a+4 b+17 c=1+2+3+\cdots+23=276$, substituting $c=23-b-a$ into $13 a+4 b+17 c=276$, we get: $4 a+13 b=115$, based on this, we need to find the minimum number of cards in the pile with an average of 13.

【Solution】Let the piles with averages of $13$, $4$, and $17$ have $a$, $b$, and $c$ cards respectively,
then: $a+b+c=23$ (1),
$$
13 a+4 b+17 c=1+2+3+\cdots+23=276
$$

From (1), we get: $c=23-b-a$,
Substituting $c=23-b-a$ into $13 a+4 b+17 c=276$,
we get: $4 a+13 b=115$,
Since $13 b<115$, we get: $b<8.8$, and $b$ is an integer,
When $b=8$, $a=2.75$ (which does not meet the requirements),
Therefore, the maximum value of $b$ is 7,
So the minimum value of $a$ is:
$$
\begin{aligned}
& (115-13 \times 7) \div 4 \\
= & 24 \div 4 \\
= & 6 \text { (cards) }
\end{aligned}
$$

Answer: The pile with an average of 13 has at least 6 cards.