Luis wrote the sequence of natural numbers starting from 1:

$$
1,2,3,4,5,6,7,8,9,10,11,12, \cdots
$$

When did he write the digit 3 for the $25^{\text {th }}$ time?
Let's see each time Luis wrote the digit 3:

- $3 \rightarrow 1$;
- $\underbrace{13,23}_{2}, \underbrace{30,31,32,33, \ldots, 39}_{11}, \underbrace{43, \ldots, 93}_{6} \rightarrow 2+6+11=19$;

So far, he has written the digit 3 twenty times. From there, we have:

$$
\underbrace{103}_{21^{\text{st}}}, \underbrace{113}_{22^{\text{nd}}}, \underbrace{123}_{23^{\text{rd}}}, \underbrace{130}_{24^{\text{th}}}, \underbrace{131}_{25^{\text{th}}}.
$$

Therefore, when he wrote the number 131, he wrote the digit 3 for the 25th time.