# For what $n$ can $\{1, 2,\ldots, n\}$ be partitioned into equal-sized sets $A$, $B$ such that $\sum_{k\in A}k^p=\sum_{k\in B}k^p$ for $p=1, 2, 3$?

This is a recent problem in American Mathematical Monthly. The deadline for this question just passed:

$$\textbf{Problem:}$$ For which positive integers $$n$$ can $$\{1,2,3,...,n\}$$ be partitioned into two sets $$A,B$$ of the same size so that:

\begin{align}\sum_{k\in A}k&=\sum_{k \in B} k ,&\sum_{k\in A}k^{2}&=\sum_{k \in B} k^{2} , &\sum_{k\in A}k^{3}&=\sum_{k \in B} k^{3} \end{align}

It is clear that the set $$\{1,2,...,16\}$$ can be partitioned into $$A=\{1,4,6,7,10,11,13,16\}$$ and $$B=\{2,3,5,8,9,12,14,15\}$$, and the sum of the elements, its squares and cubes, are equal in $$A$$ and $$B$$. So for any $$n$$ divisible by $$16$$, an extension of this argument will work. It is not too difficult to show that $$n$$ has to be a multiple of $$8$$.

Can we have any $$n$$ which is an odd multiple of $$8$$, for which the problem statement is true; say $$24$$?

• Works for all $n=8k$ with $k \geq 2$. See mat.uniroma2.it/~tauraso/AMM/AMM12085.pdf .
– Sil
Jun 4, 2019 at 22:32
• See also arxiv.org/pdf/1304.6756.pdf (Theorem 5.2): $A = \{ 1,3,7,8,9,11, 14, 16,17,18,22,24\}$ and $B$ the complement. Jun 4, 2019 at 22:37
• Wow, this is pretty interesting. Great post! I'm stumped but apparently @Sil knows what's up. Jun 4, 2019 at 23:35
• That is actually solution by user @RobertZ here on MSE, if I am not mistaken.
– Sil
Jun 5, 2019 at 6:56
• It's clear that once you show a partition for $n=16$ and for $n=24$, then for any multiple $8k, k\geq 2$ we get a required partition; this is outlined in the pdf. Jun 5, 2019 at 14:53