Find all pairs of positive integers $(n,k)$ for which the number $m=1^{2k+1}+2^{2k+1}+\cdots+n^{2k+1}$ is divisible by $n+2.$
To find all pairs of positive integers \((n, k)\) for which the number \(m = 1^{2k+1} + 2^{2k+1} + \cdots + n^{2k+1}\) is divisible by \(n+2\), we will consider two cases: when \(n\) is odd and when \(n\) is even.

### Case 1: \(n\) is odd
1. Let \(n\) be an odd integer. We can pair the terms in the sum \(m\) as follows:
   \[
   m = 1^{2k+1} + 2^{2k+1} + \cdots + n^{2k+1}
   \]
   We can pair the terms symmetrically around the middle:
   \[
   m = (1^{2k+1} + n^{2k+1}) + (2^{2k+1} + (n-1)^{2k+1}) + \cdots
   \]
2. Since \(n\) is odd, there will be a middle term \(\left(\frac{n+1}{2}\right)^{2k+1}\). The sum modulo \(n+2\) can be written as:
   \[
   m \equiv 1^{2k+1} + n^{2k+1} + 2^{2k+1} + (n-1)^{2k+1} + \cdots + \left(\frac{n+1}{2}\right)^{2k+1} \pmod{n+2}
   \]
3. Notice that for each pair \((i, n+1-i)\), we have:
   \[
   i^{2k+1} + (n+1-i)^{2k+1} \equiv i^{2k+1} + (-i)^{2k+1} \equiv 0 \pmod{n+2}
   \]
   because \((n+1-i) \equiv -i \pmod{n+2}\).
4. Therefore, the sum of all pairs is congruent to 0 modulo \(n+2\), except for the middle term \(\left(\frac{n+1}{2}\right)^{2k+1}\):
   \[
   m \equiv \left(\frac{n+1}{2}\right)^{2k+1} \pmod{n+2}
   \]
5. Since \(n\) is odd, \(\frac{n+1}{2}\) is an integer. For \(m\) to be divisible by \(n+2\), we need:
   \[
   \left(\frac{n+1}{2}\right)^{2k+1} \equiv 0 \pmod{n+2}
   \]
   This is not possible because \(\frac{n+1}{2}\) is less than \(n+2\).

Thus, for odd \(n\), \(n+2\) does not divide \(m\).

### Case 2: \(n = 2t\) is even
1. Let \(n = 2t\) be an even integer. We can pair the terms in the sum \(m\) as follows:
   \[
   m = 1^{2k+1} + 2^{2k+1} + \cdots + (2t)^{2k+1}
   \]
   We can pair the terms symmetrically around the middle:
   \[
   m = (1^{2k+1} + (2t)^{2k+1}) + (2^{2k+1} + (2t-1)^{2k+1}) + \cdots
   \]
2. Since \(n\) is even, there will be no middle term. The sum modulo \(n+2\) can be written as:
   \[
   m \equiv 1^{2k+1} + (2t)^{2k+1} + 2^{2k+1} + (2t-1)^{2k+1} + \cdots \pmod{2t+2}
   \]
3. Notice that for each pair \((i, 2t+1-i)\), we have:
   \[
   i^{2k+1} + (2t+1-i)^{2k+1} \equiv i^{2k+1} + (-i)^{2k+1} \equiv 0 \pmod{2t+2}
   \]
   because \((2t+1-i) \equiv -i \pmod{2t+2}\).
4. Therefore, the sum of all pairs is congruent to 0 modulo \(2t+2\):
   \[
   m \equiv 0 \pmod{2t+2}
   \]

Thus, for even \(n\), \(n+2\) divides \(m\).

The final answer is \( \boxed{ (n, k) } \) where \(n\) is even.