Calculate the sum of the digits of the first 100 numbers of that sequence which are divisible by 202.​ In the sequence 20, 202, 2020, 20202, 202020, ... each subsequent number is obtained by adding the digit 2 or 0 to the previous number, alternately. Calculate the sum of the digits of the first 100 numbers of that sequence which are divisible by 202.​
my attempt:
¿. Given sequence:
$20,202,2020,20202, \cdots$
let $n$ be the number of elements of the sequence in the first 100 numbers which ahe divisible by 202. Looking at the pattern, the first number of the sequence, divisible by 202, is 202 with digital root = 4,  the second number of the sequence, divisible by 202, is 2020202 with digital roof $=8$ the third number of the sequence, by 202, is 20202020202 with digital root $=12$ and so on.
 A: Note that $n=\sum_{k=0}^r c_k\cdot 100^k$ is divisible by $101$ if and only if
$$n=\sum_{k=0}^r c_k\cdot 100^k\equiv \sum_{k=0}^rc_k(-1)^k\equiv 0 \pmod{101}.$$
In other words, given a number $n$ take the digits in pairs from the right and alternately add and subtract them. The number $n$ is divisible by $101$ if and only if the result is zero modulo $101$ (it reminds the divisibility rule for $11$)
Therefore in your sequence, a number is divisible by $202=2\cdot 101$ iff the number of its digits is $0\pmod 4$ or $3\pmod 4$:
$$202,2020,2020202,20202020,20202020202,202020202020\dots$$
So the sum of the digits of the first 100 numbers of that sequence which are divisible by $202$ is
$$4\cdot(1+1+2+2+3+3+\dots+50+50)$$
What is the final answer?
A: Divide it into two questions.

*

*is the any obvious patterns two which of the numbers are divisible by $202$ and which are not?


*Given the pattern in the answer to 1) is the any obvious way to calculate the some of digits?
Answer to 1) Clearly if there are any even number of $2$ so the number is
$N=\underbrace{202}0\underbrace{202}0\underbrace{202}0\underbrace{202}0....0\underbrace{202}$ then $N = 202\times 100010001......0001$ and is divisible by $202$.
And if there are an odd number of twos then
$N =\underbrace{202}0\underbrace{202}0\underbrace{202}0\underbrace{202}0....0\underbrace{202}02$ will have a remainder of $2$ and will not be divisible by $202$.
Answer to 2) So a number is divisible by $202$ if it has an even $2k$ number of digits.  The first $100$ such numbers are then numbers that start with $2\times 1 = 2$ digits of $2$ and end with the number that has $2\times 100 = 200$ digits of $2$.
The $k$th number will have $2k$ twos in it and the sum of the $k$th number will by $2\times (2k) = 4k$.  And so the sum of all $100$ if the numbers from $k=1$ to $k=100$ that is
$SUM = \sum_{k=1}^{100}4k$
And that is equal to $4\sum_{k=1}^{100}k$.
Now EVERY mathematician is secretly jealous and resentful of that snot-nosed little 5-year old Gauss[1] (although most won't admit it) and every mathematician knows $\sum_{k=1}^{100}k = \frac {100\times 101}2 = 5050$.
So $SUM = 4\times 5050 = 20200$.
=====
[1] who gets younger and younger with each retelling of the stupid annoying story.....[2]
[2] In case you don't know it, Gauss' tutor gave him a busy work assignment to add up all the numbers from $1$ to $100$.  "That'll keep the little brat quiet for a while" the tutor thought.  And between 5 minutes or 45 seconds (the time gets shorter with each telling too) the precocious little tyke came up with the answer $5050$.
The tutor said "How in the world..." and the kid said  "I lined up all the numbers from $1$ to $100$ going up, and added them to all the numbers $100$ to $1$ going down so each pair added to $101$ and I had $100$ of them so I divided that in half and got  $5050$".
A: If you take the first eight numbers you will get this:
$$20
\\202
\\2020
\\20202
\\202020
\\2020202
\\20202020
\\202020202$$
As you can see, for each stack of $4$, only the second and third are divisible by $202$. For the first stack, the sum is $202+2020=2222$, for the second stack $2020202+20202020=22222222$. We find a pattern: the sum of the digits of the first stack is $8$, the sum of the digits of the second stack is $16$. Since we are adding either $0$ or $2$ to the end of the numbers, this will continue the sum of the stack as $8,16,24,...$
We are going to have $25$ stacks. So, we created an arithmetic sequence where $a_1=8, d=8$, and we need to find $S_{25}$. Since $S_n=\frac{n(2a_1+(n-1)d)}{2}$, we will have the following sum:
$S_{25}=\frac{25(2\cdot8+(25-1)8)}{2}=2600$
