Problem

Source: : 2019 Romania JBMO TST 2.1

Tags: number theory, divides, Sum



Let $n$ be a nonnegative integer and $M =\{n^3, n^3+1, n^3+2, ..., n^3+n\}$. Consider $A$ and $B$ two nonempty, disjoint subsets of $M$ such that the sum of elements of the set $A$ divides the sum of elements of the set $B$. Prove that the number of elements of the set $A$ divides the number of elements of the set $B$.