For which $n$ can the natural numbers $1,2,3, \ldots, n$ be divided into three groups such that the sum of the numbers in each group is equal?
The desired grouping can only be carried out if the sum of natural numbers from 1 to $n$ is divisible by 3. Since this sum is $n(n+1) / 2$, a necessary condition for solvability is that $n$ or $n+1$ must be divisible by 3.

We will prove by complete induction that this condition is also sufficient for $n>3$. (If $n \leq 3$, it is obviously impossible to form the required groups.)

For $n=5$, the grouping is possible. The groups are: $\{1 ; 4\},\{2 ; 3\},\{5\}$.

For $n=6$, the groups are: $\{1 ; 6\},\{2 ; 5\},\{3 ; 4\}$.

We will show that if the grouping is possible for $n$, it is also possible for $(n+3)$.

Consider the groups of the natural numbers $1,2,3, \ldots, n$ that satisfy the problem. If we remove 1 from its group and replace it with the number $n+3$, and then place 1 and $(n+1)$ in another group, and finally place $n+2$ in the remaining group, the sum of the numbers in each of the three groups will increase by $n+2$, so the sum of the numbers in each group will remain equal. In summary: the desired grouping is possible if and only if $n=3k$, or $n=3k-1$, where $k \geq 2$ is an integer.