Problem

Source:

Tags: number theory, Digits



Define $Alt(n) = d_1 - d_2 + d_3 - d_4 + ... + (-1)^{n+1}d_n$, where $d_1$, $d_2$, $...$, $d_n$ are the digits of n from left to right (for example if $n = 123$, then $d_1 = 1$, $d_2 = 2$, $d_3 = 3$). Now we define $a_k$ as the smallest natural number $m$ such that $Alt(m) = k$. Amongst $a_1, a_2, . . . a_{2023}$, $s$ of them are divisible by $11$. Enter $s$ mod $1000$.