Joana wrote a sequence in 10 lines using the digits from 0 to 9, following the pattern below.

$$
\begin{array}{lllllllllll}
0 & & & & & & & & & \\
1 & 1 & 0 & & & & & & & \\
2 & 2 & 2 & 1 & 1 & 0 & & & & \\
3 & 3 & 3 & 3 & 2 & 2 & 2 & 1 & 1 & 0
\end{array}
$$

Which digit was used the most? How many times was this digit used?
According to the pattern of the sequence, we have

![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-078.jpg?height=274&width=908&top_left_y=2142&top_left_x=655)

Thus,

one digit 0 in each line gives \(1 \times 10 = 10\) digits 0 in total; two digits 1 in nine lines give \(2 \times 9 = 18\) digits 1 in total; three digits 2 in eight lines give \(3 \times 8 = 24\) digits 2 in total; four digits 3 in seven lines give \(4 \times 7 = 28\) digits 3 in total,
and so on. Therefore, it is a matter of finding which is the largest of the following products, where each represents how many digits, from 0 to 9, appear in the sequence.

![](https://cdn.mathpix.com/cropped/2024_05_01_280b19a87fa67143351eg-079.jpg?height=103&width=1274&top_left_y=388&top_left_x=425)

Since the largest product is 30, the most used digits were 4 and 5, 30 times each.