Problem 2. Determine the sides of the right triangle for which the perimeter, $p=96$, and the height to the hypotenuse, $h=\frac{96}{5}$, are known.
Solution. Consider the right triangle in the figure.

![](https://cdn.mathpix.com/cropped/2024_04_26_cea0cc6a7cd40c74c508g-1.jpg?height=343&width=731&top_left_y=1753&top_left_x=705)

We seek relationships between these segments.

The area of the triangle is: $\frac{b c}{2}=\frac{a h}{2}$, from which it follows that

$$
b c=a h
$$

Since $p=a+b+c$, we have $b+c=p-a$, so $(b+c)^{2}=(p-a)^{2}$, and from here, using that $a^{2}=b^{2}+c^{2}$, we have $2 b c=p^{2}-2 p a$. Now using the relation (1) we have: $2 a h=p^{2}-2 p a$. Finally, we can calculate $a$ as:

$$
a=\frac{p^{2}}{2(h+p)}
$$

Since $a$ is now known, and considering the relations: $b+c=p-a$ and $b c=a h$, we can calculate $b$ and $c$ as the solutions of the quadratic equation $z^{2}-(b+c) z+b c=0$, which is the equation $z^{2}-(p-a) z+a h=0$.

In our case, with the given values, we have:

$$
\begin{aligned}
& p=96 \\
& h=96 / 5 \\
& a=\frac{p^{2}}{2(h+p)}=\frac{96^{2}}{2(96+96 / 5)}=40
\end{aligned}
$$

It remains to calculate $b$ and $c$, which are the roots of the equation $z^{2}-(p-a) z+a h=0$, that is, the equation $z^{2}-56 z+768=0$; and whose roots are: 32 and 24.

The sides of the given triangle are: 40, 32, and 24.

Problem 3. Find all natural numbers $n$ that satisfy the condition:

$$
\left[\frac{n}{2}\right]+\left[\frac{2 n}{3}\right]=n+335
$$

where $[x]$ is the integer part of $x$. (That is, $[1.32]=1, [2]=2, \left[\frac{1}{2}\right]=0, [\pi]=3$, etc.)

Solution. We distinguish cases according to whether $n$ is of the form $6 k, 6 k+1, 6 k+2, 6 k+3, 6 k+4$ or $6 k+5$ (observe that $n$ is always of one of these six forms) and make the following table:

| $n$ | $\left[\frac{n}{2}\right]$ | $\left[\frac{2 n}{3}\right]$ | $\left[\frac{n}{2}\right]+\left[\frac{2 n}{3}\right]$ | $n+335$ |
| :---: | :---: | :---: | :---: | :---: |
| $6 k$ | $3 k$ | $4 k$ | $7 k$ | $6 k+335$ |
| $6 k+1$ | $3 k$ | $4 k$ | $7 k$ | $6 k+336$ |
| $6 k+2$ | $3 k+1$ | $4 k+1$ | $7 k+2$ | $6 k+337$ |
| $6 k+3$ | $3 k+1$ | $4 k+2$ | $7 k+3$ | $6 k+338$ |
| $6 k+4$ | $3 k+2$ | $4 k+2$ | $7 k+4$ | $6 k+339$ |
| $6 k+5$ | $3 k+2$ | $4 k+3$ | $7 k+5$ | $6 k+340$ |

Equating the last two columns, we get:

- If $n=6 k$ then $7 k=6 k+334$, so $k=335$ and $n=6 \cdot 334=2010$.
- If $n=6 k+1$ then $7 k=6 k+335$, so $k=336