Task 1 - 261241  
500 candies are to be packed into a joke package using wrapping materials of suitable sizes, such that the following conditions (1), (2) are met.

Condition (2) should apply to every possible way of unpacking all the candies by gradually opening and removing an accessible wrapping (if multiple wrappings are accessible, in any order):

(1) There is exactly one wrapping that contains the entire package.

(2) When opening this and each subsequent wrapping, it is revealed that its content consists either of at least three individually wrapped sub-packages or of exactly one unwrapped candy.

Determine the maximum number of wrappings that such a package can have!
For every positive integer $n \neq 2$, a package that contains exactly $n$ candies and satisfies (1) and (2) is called an "$n$-package".

For each candy in an $n$-package, there is a wrapper that contains exactly this candy (otherwise, there would be, in contradiction to (2), a wrapper that contained this not yet wrapped candy and other parts).

The additional wrappers in the $n$-package, apart from these $n$ wrappers of the individual $n$ candies, are called "additional wrappers".

By complete induction, it is now proven: The maximum number of additional wrappers in an $n$-package is the largest integer less than $\frac{n}{2}$.

1. Every 1-package consists of exactly one candy with its wrapper, so it has no additional wrappers. Every 3-package consists of exactly three candies with their wrappers and exactly one additional wrapper. For $n=1$ and $n=3$, the claim is therefore true.
2. Let $k \geq 4$, and assume as the induction hypothesis that for all positive integers $n1$ from at least three completely wrapped sub-packages. If there were five or more, the content could be changed without violating (2) by adding a new wrapper around exactly three of the sub-packages.

This contradicts the assumed maximality of the number of additional wrappers in the $k$-package. Therefore, the content of $H$ consists of either exactly three or exactly four sub-packages. Each of them satisfies (1) and (2) itself, so it is an $n_{i}$-package ($i=1,2,3$ or $i=1,2,3,4$); here, each $n_{i}$ is a positive integer with $n_{i} \neq 2$. Furthermore,

$$
n_{1}+n_{2}+n_{3}=k \quad \text{or} \quad n_{1}+n_{2}+n_{3}+n_{4}=k
$$

Thus, all $n_{i} < k$. Each of these $n_{i}$-packages must itself have a maximum number $z_{i}$ of additional wrappers (otherwise, it could be replaced by an $n_{i}$-package with a larger number of additional wrappers, which contradicts the maximality of the $k$-package).

By the induction hypothesis, $z_{i}$ is thus the largest integer less than $\frac{n_{i}}{2}$.

In both cases $k=2m$ and $k=2m+1$, there are, with respect to their representability as $n_{i}=2m_{i}$ or $n_{i}=2m_{i}+1$ (with $m$, $m_{i}$ being integers), up to the order, exactly the possibilities of the following table.

Subsequently, the $z_{i}$ and their sum $s$ are given under the application of (3).

| $k$ | $n_{1}$ | $n_{2}$ | $n_{3}$ | $n_{4}$ | $z_{1}$ | $z_{2}$ | $z_{3}$ | $z_{4}$ | $s$ |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| $2m$ | $2m_{1}$ | $2m_{2}$ | $2m_{3}$ |  | $m_{1}-1$ | $m_{2}-1$ | $m_{3}-1$ |  | $m-3$ |
|  | $2m_{1}$ | $2m_{2}+1$ | $2m_{3}+1$ |  | $m_{1}-1$ | $m_{2}$ | $m_{3}$ |  | $m-2$ |
|  | $2m_{1}$ | $2m_{2}$ | $2m_{3}$ | $2m_{4}$ | $m_{1}-1$ | $m_{2}-1$ | $m_{3}-1$ | $m_{4}-1$ | $m-4$ |
|  | $2m_{1}$ | $2m_{2}$ | $2m_{3}+1$ | $2m_{4}+1$ | $m_{1}-1$ | $m_{2}-1$ | $m_{3}$ | $m_{4}$ | $m-3$ |
|  | $2m_{1}+1$ | $2m_{2}+2$ | $2m_{3}+1$ | $2m_{4}+1$ | $m_{1}$ | $m_{2}$ | $m_{3}$ | $m_{4}$ | $m-2$ |
| $2m+1$ | $2m_{1}$ | $2m_{2}$ | $2m_{3}+1$ |  | $m_{1}-1$ | $m_{2}-1$ | $m_{3}$ |  | $m-2$ |
|  | $2m_{1}+1$ | $2m_{2}+1$ | $2m_{3}+1$ |  | $m_{1}$ | $m_{2}$ | $m_{3}$ |  | $m-1$ |
|  | $2m_{1}$ | $2m_{2}$ | $2m_{3}$ | $2m_{4}+1$ | $m_{1}-1$ | $m_{2}-1$ | $m_{3}-1$ | $m_{4}$ | $m-3$ |
|  | $2m_{1}$ | $2m_{2}+1$ | $2m_{3}+1$ | $2m_{4}+1$ | $m_{1}-1$ | $m_{2}$ | $m_{3}$ | $m_{4}$ | $m-2$ |

The additional wrappers in the $k$-package are now: the $s$ additional wrappers of the individual $n_{i}$-packages and the wrapper $H$.

Due to the maximality, all possibilities for $s$ except the highlighted ones are excluded, and we obtain: The maximum number of additional wrappers in a $k$-package is the number $m-1$ in the case $k=2m$, and the number $m$ in the case $k=2m+1$.

This is the claim for $n=k$.

With 1. and 2., the claim is thus proven for all positive integers $n \neq 2$. It results for $n=500$: The maximum number of additional wrappers is 249. The largest possible number of all wrappers is therefore 749.

## Adapted from $[5]$