5. If there exists a permutation $a_{1}$, $a_{2}, \cdots, a_{n}$ of $1,2, \cdots, n$, such that $k+a_{k}(k=1,2, \cdots, n)$ are all perfect squares, then $n$ is called a "middle number". Then, in the set $\{15,17,2000\}$, the number of elements that are middle numbers is $\qquad$ .
5.3.
(1) 15 is a median number. Because in the arrangement of Table 1, $k+a_{k}$ $(k=1,2, \cdots, 15)$ are all perfect squares:
Table 1
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline$k$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 \\
\hline$a_{k}$ & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 \\
\hline$k+a_{k}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ & $4^{2}$ \\
\hline
\end{tabular}
(2) 17 is a median number. Because in the arrangement of Table 2, $k+a_{k}$ $(k=1,2, \cdots, 17)$ are all perfect squares:
Table 2
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline$k$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 \\
\hline$a_{k}$ & 3 & 7 & 6 & 5 & 4 & 10 & 2 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 1 & 9 & 8 \\
\hline$k+a_{k}$ & $2^{2}$ & $3^{2}$ & $3^{2}$ & $3^{2}$ & $3^{2}$ & $4^{2}$ & $3^{2}$ & $5^{2}$ & $5^{2}$ & $5^{2}$ & $5^{2}$ & $5^{2}$ & $5^{2}$ & $5^{2}$ & $4^{2}$ & $5^{2}$ & $5^{2}$ \\
\hline
\end{tabular}
(3) 2006 is a median number. Because it can be arranged in such a way that $k+a_{k}(k=1,2, \cdots, 2006)$ are all perfect squares:

For $k$ taking $1,2, \cdots, 17, a_{k}$ can correspond as in (2); for $k$ taking 18, $a_{k}=18$ can correspond; for $k$ taking $19,20, \cdots, 2006$, $a_{k}$ can sequentially take $2006,2005, \cdots, 19$ to correspond.