Let's group the triangles from the previous task according to their longest side. What regularity do we find in the number of triangles in the consecutive groups? Is this regularity valid further on?
Let the sides of the triangle be $a \geq b \geq c$. We need $b+c > a$, so $b$ must always be greater than $\frac{a}{2}$. The smallest such integer is $\left[\frac{a}{2}\right]+1$. Therefore, the possible values of $b$ are $\left[\frac{a}{2}\right]+1, \left[\frac{a}{2}\right]+2, \ldots, a$; and $c$ can range from $a-b+1$ to $b$, so for a given $b$, it can take $2b-a$ different values. Thus, the number of all such integer triangles with the longest side $a$ is:

$$
N_{a}=\left(2\left[\frac{a}{2}\right]-a+2\right)+\left(2\left[\frac{a}{2}\right]-a+4\right)+\left(2\left[\frac{a}{2}\right]-a+6\right)+\ldots+a
$$

This is an arithmetic series, with the number of terms being the number of different possible values of $b$: $a-\left\lceil\frac{a}{2}\right]$, so

$$
N_{a}=\frac{\left(a-\left[\frac{a}{2}\right]\right)\left\{\left(2\left[\frac{a}{2}\right]-a+2\right)+a\right\}}{2}=\left(a-\left[\frac{a}{2}\right]\right)\left(\left[\frac{a}{2}\right]+1\right)
$$

If $a$ is even: $\quad a=2n \quad N_{2n}=n(n+1)$,

if $a$ is odd: $a=2n+1 \quad N_{2n+1}=(n+1)^{2}$,

$$
\begin{aligned}
& N_{2n+1}-N_{2n}=(n+1)(n+1)-n(n+1)=n+1 \\
& N_{2n+2}-N_{2n+1}=(n+2)(n+1)-(n+1)(n+1)=n+1
\end{aligned}
$$

Thus, the difference between consecutive terms of the sequence $N_{1}, N_{2}, N_{3}, \ldots$ is, except for the unique 1 at the beginning, every second term is $1-\mathrm{g}$:

$$
\begin{array}{ccccccccccccccc}
N_{k}: & 1 & 2 & 4 & 6 & 9 & 12 & 16 & 20 & 25 & 30 & 36 & 42 & 49 & \ldots \\
N_{k+1}-N_{k}: & 1 & 2 & 2 & 3 & 3 & 4 & 4 & 5 & 5 & 6 & 6 & 7 & \ldots
\end{array}
$$

Sándor Gacsányi (8th grade)

Solved by: Gehér L., Kóvári T.