Task B-2.5. Professor Ante wrote the first $n$ natural numbers in a row on the board, starting from 1, and said to Mate: "Under each written number, write the product of that number and all the numbers written before it." "And you, Kate, add up all the numbers that Mate wrote and write the result." If Kate wrote the number $m^{2}$, determine all pairs of natural numbers $m$ and $n$ for which this is true.
## Solution.

We need to determine all pairs of natural numbers $m$ and $n$ that satisfy the equation

$$
1+1 \cdot 2+1 \cdot 2 \cdot 3+1 \cdot 2 \cdot 3 \cdot 4+\ldots+1 \cdot 2 \cdot 3 \cdot \ldots \cdot(n-1) \cdot n=m^{2}
$$

For $n>4$, each term $1 \cdot 2 \cdot 3 \cdot \ldots \cdot(n-1) \cdot n$ contains at least one even number and at least one number divisible by 5, which means that these terms end in the digit 0.

Since $1+1 \cdot 2+1 \cdot 2 \cdot 3+1 \cdot 2 \cdot 3 \cdot 4=33$, for $n>4$ the sum on the left side ends in the digit 3. Since the squares of natural numbers end in one of the digits $0,1,4,5,6$ or 9, we conclude that for $n>4$ there are no pairs of natural numbers $n$ and $m$ that satisfy the given equation.

We still need to check the cases when $n \leq 4$.

If $n=1$, then $1=1$ and the corresponding pair is $(1,1)$.

If $n=2$, then $1+1 \cdot 2=3$ and there is no solution in $\mathbb{N}$.

If $n=3$, then $1+1 \cdot 2+1 \cdot 2 \cdot 3=9$ and the corresponding pair is $(3,3)$.

If $n=4$, then $1+1 \cdot 2+1 \cdot 2 \cdot 3+1 \cdot 2 \cdot 3 \cdot 4=33$ and there is no solution in $\mathbb{N}$.

Therefore, the two ordered pairs that are solutions are: $(n, m) \in\{(1,1),(3,3)\}$.

# NATIONAL MATHEMATICS COMPETITION

## 3rd grade - high school - B variant

Šibenik, April 3, 2014.

IF A STUDENT HAS A DIFFERENT APPROACH TO SOLVING THE PROBLEM, THE COMMITTEE IS OBLIGED TO GRADE THAT APPROACH AND EVALUATE IT APPROPRIATELY.