For which positive integers $500\le n\le 528$ does there exist a positive integer k so that the numbers from 1 to 3k can be split into k pairwise disjoint subsets, each of size 3 and each of which sums to n?
The above problem is based on a problem from an old IMO contest, though I'm not sure exactly which one.
Call a positive integer $n$ k-good if the numbers from $1$ to $3k$ can be split into k pairwise disjoint subsets, each of size 3 and each of which sums to n. Call a positive integer n good if it is k-good for some positive integer k. Finally, say a partition of $\{1,\cdots, 3k\}$ into k pairwise disjoint subsets is good if each subset is of size 3 and sums to n. I think it's useful to come up with a lower bound for $n$. If $n$ is a k-good positive integer, then pick k pairwise disjoint subsets of size 3 with sum n. Each subset has sum at least $3k+3$, so $n\ge 3k+3$. Also, we must have $kn = \dfrac{3k(3k+1)}2\Rightarrow n = \dfrac{9k+3}2$. Hence for each $k$ there is at most one integer value of $n$ that can be good. Thus the only possibly good values of $n$ are $k$-good for some odd integer k that is uniquely determined from n. It could be useful to investigate k-good integers for small values of k. $n=6$ is good since we can choose the subset $\{1,2,3\},$ and this is the only possibility for $k=1$. For $k\ge 1,$ we need $n$ to be at least $3k + 3.$ Taking $k=3$, we get $(9(3)+3)/2 = 15$. And $n=15$ turns out to be good because $\{9,1,5\}, \{8,3,4\}, \{7,2,6\}$ is a partition of $\{1,\cdots, 3k\}$ satisfying the problem conditions.
Note: there doesn't seem to be a good way of confirming whether a particular value of n is k-good without explicitly constructing the pairwise disjoint subsets.
For the given problem, we know the only possibly good values of n in the given range can be $(9(117)+3)/2 = 528, (9(115)+3)/2 = 519, (9(113)+3)/2 = 510, (9(111)+3)/2 = 501.$ I'm not sure how to construct the pairwise disjoint subsets for $n=528$ though.
Here is a pattern that works for all odd $k$. Break the $3k$ numbers into the groups $1-k, (k+1)-2k, (2k+1)-3k$. The subsets will have one number from each group and we will step through the groups. You start with $1,\frac 12(3k+1),3k$, then change the values by $+2,-1,-1$ for $\frac 12(k-1)$ times, arriving at $k,k+1,\frac 52k+\frac 12$, then start with $2,2k,\frac 52k-\frac 12$ and change the values by $+2,-1,-1$ for $\frac 12(k-3)$ times. The way this works for $k=7$ is shown below $$\begin {array} {r r r} 1&11&21\\3&10&20\\5&9&19\\7&8&18\\2&14&17\\4&13&16\\ 6&12&15 \end {array}$$