3. Divide the numbers $1,2, \cdots, 30$ into $k$ groups (each number can only appear in one group) such that the sum of any two different numbers in each group is not a perfect square. Find the minimum value of $k$.

Put the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
3. First consider the numbers $6,19,30$.

Since $6+19=5^{2}, 6+30=6^{2}, 19+30=7^{2}$, these 3 numbers must be in 3 different groups. Therefore, $k \geqslant 3$.
Next, divide the 30 numbers $1,2, \cdots, 30$ into the following 3 groups:
$$
\begin{array}{l}
A_{1}=\{3,7,11,15,19,23,27,4,8,16,24\}, \\
A_{2}=\{1,5,9,13,17,21,25,29,6,14,18,26\}, \\
A_{3}=\{2,10,12,20,22,28,30\},
\end{array}
$$

such that they satisfy the conditions of the problem.
Since the remainder of a perfect square when divided by 4 can only be 0 or 1, it is easy to verify that $A_{1}, A_{2}, A_{3}$ satisfy the conditions of the problem.