<s>[INST] Partitioning of sets Question:
Consider set $A= \{ 1, 2, 3, ..., n\}$. For what values of $n$ can $A$ be partitioned into 3 subsets $A_1, A_2, A_3$, such that sum of the elements of each of them are equal?
My Attempt:
For the set $A$ to be partitioned in the required way, sum of all elements of $A$ must be divisible by $3$. Thus a necessary condition is:
$1 + 2 + .. + n = n(n+1)/2 \equiv 0 $ mod $3$
which implies $n = 3t $ or $n = 3t-1$ for integer $t>2$
On trial with values of t up to $t=11$, I found that in every case, $A$ can be partitioned according to the given conditions. But how can I prove this?
 [/INST] Sum of arithmetical seqence: $x, x+3, x+6, \ldots, x+3(a-1)$ is $\frac { x + (x+3(a-1))}{2}a $.
Hence for theree sequences sequences beginning from $x=1,2,3$ and of lenghts: $a,b,c$ accordlingly, we have the sum of these three sequnces:
$\frac{3a-1}{2}a + \frac{3b+1}{2}b + \frac{3c+3}{2}c = 3\frac{a^2+b^2+c^2}{2}-a+b+3c$.
In the case when $3|n$ we can choose: $a=n/3, b=n/3, c=n3$.
In the case when $3|(n-1)$ we can choose: $a=(n-1)/3, b=(n-1)/3, c=(n+2)/3$.
In both cases total sum is $\frac{n^2+n}{2}$ as we hope.
</s>