B1. Find all natural numbers $n$ for which there exists a rectangle whose side lengths are natural numbers, its perimeter is equal to $n$ and numerically equal to its area.
B1. Let $a$ and $b$ be the lengths of the sides of such a rectangle. From the problem statement, it follows that $2(a+b)=n=ab$. We rearrange this equation between $a$ and $b$ to $a(b-2)=2b$ and from there express

$$
a=\frac{2b}{b-2}=\frac{2(b-2)}{b-2}+\frac{4}{b-2}=2+\frac{4}{b-2}
$$

Since $a$ and $b$ are natural numbers, the number $b-2$ must divide 4. Since the number $b-2$ is greater than -2, it can only be $-1, 1, 2$ or 4. Thus, $b$ is sequentially equal to $1, 3, 4$ or 6, and $a$ is sequentially equal to $-2, 6, 4$ or 3. The first case is invalid because -2 is not a natural number. In the second and fourth cases, we get $n=18$, and in the third case, $n=16$.

![](https://cdn.mathpix.com/cropped/2024_06_07_a0d1506e8e2028d6d427g-19.jpg?height=60&width=1573&top_left_y=758&top_left_x=276)

Rearrangement of the equation and expression of $a$ (or $b$). 1 point

Conclusion that $b-2$ divides 4. 1 point

Determination that $b$ is equal to 1, 3, 4, or 6. 2 points

Writing both solutions ($n=16$ or $n=18$). 1 point (If the contestant only writes the solutions, 1 point is awarded.)