15. (MEX 2) Determine for which positive integers $k$ the set  $$ X=\{1990,1990+1,1990+2, \ldots, 1990+k\} $$  can be partitioned into two disjoint subsets $A$ and $B$ such that the sum of the elements of $A$ is equal to the sum of the elements of $B$.
15. Let \( S(Z) \) denote the sum of all the elements of a set \( Z \). We have \( S(X) = (k+1) \cdot 1990 + \frac{k(k+1)}{2} \). To partition the set into two parts with equal sums, \( S(X) \) must be even and hence \( \frac{k(k+1)}{2} \) must be even. Hence \( k \) is of the form \( 4r \) or \( 4r+3 \), where \( r \) is an integer. For \( k = 4r + 3 \) we can partition \( X \) into consecutive fourtuplets \( \{1990 + 4l, 1990 + 4l + 1, 1990 + 4l + 2, 1990 + 4l + 3\} \) for \( 0 \leq l \leq r \) and put \( 1990 + 4l, 1990 + 4l + 3 \in A \) and \( 1990 + 4l + 1, 1990 + 4l + 2 \in B \) for all \( l \). This would give us \( S(A) = S(B) = (3980 + 4r + 3)(r + 1) \). For \( k = 4r \) the numbers of elements in \( A \) and \( B \) must differ. Let us assume without loss of generality \( |A| < |B| \). Then \( S(A) \leq (1990 + 2r + 1) + (1990 + 2r + 2) + \cdots + (1990 + 4r) \) and \( S(B) \geq 1990 + 1991 + \cdots + (1990 + 2r) \). Plugging these inequalities into the condition \( S(A) = S(B) \) gives us \( r \geq 23 \) and consequently \( k \geq 92 \). We note that \( B = \{1990, 1991, \ldots, 2034, 2052, 2082\} \) and \( A = \{2035, 2036, \ldots, 2051, 2053, \ldots, 2081\} \) is a partition for \( k = 92 \) that satisfies \( S(A) = S(B) \). To construct a partition out of higher \( k = 4r \) we use the \( k = 92 \) partition for the first 93 elements and construct for the remaining elements as was done for \( k = 4r + 3 \). Hence we can construct a partition exactly for the integers \( k \) of the form \( k = 4r + 3, r \geq 0 \), and \( k = 4r, r \geq 23 \).