.
Here is another ("elegant") solution, which tutor @greenestamps wants to see
(and you, probably, too).
The base for this solution is the same rule of divisibility by 9:
The number is divisible by 9 if and only if the sum of its digits is divisible by 9.
The more general form of this rule is
For any number, the remainder of dividing by 9 is the same as the remainder of dividing by 9 the sum of its digits.
For both forms, see the lesson
- Divisibility by 9 rule
in this site.
It follows immediately from these rules, that the remainder of division the number L(m) by 9
is equal to the remainder of divisibility by 9 the number
1 + 2 + 3 + . . . + 9 + 10 + 11 + 12 + . . . + 99 + 100 + 101 + 102 + . . . 999 + 1000 + 1001 + 1002 + . . . + the last 4-digit number m =
= the sum of the first "m" natural numbers = .
So, all we need is to check the remainder of dividing by 9 of several numbers of the form ,
starting from m = 2021, 2022, 2023, 2024 . . .
The table below (made using the function r = mod(N,9) of Excel) shows these remainders
m 2021 2022 2023 2024
r = 6 3 1 0
Thus that minimal value of "m" the problems is asking for is 2024. ANSWER
Solved.