2. If we remove one or more digits from the beginning and/or end of a positive integer and still have a positive integer left, we call that a fragment of the original number. Thus, 2, 1, 9, 20, 19, and 201 are fragments of 2019.

What is the smallest positive integer $n$ with the property: there is a fragment of $n$ such that when you add that fragment to $n$ itself, the result is 2019?
B2. 1836 The number $n$ must consist of four digits. After all, a number of at most three digits plus a fragment gives at most $999+99<2019$ and a number of five digits is already greater than 2019. We write $n=a b c d$ where $a, b, c$ and $d$ are the digits of $n$. Since we want $n$ to be as small as possible, we should choose a fragment of three digits (if possible). We thus want $a b c d+b c d=2019$ or $a b c d+a b c=2019$. Since $a b c d+b c d$ always results in an even number, that case is ruled out. Therefore, we have

![](https://cdn.mathpix.com/cropped/2024_04_17_732d64300714d2dca006g-3.jpg?height=139&width=340&top_left_y=730&top_left_x=869)

Note that in the addition, we might need to carry over one to the digit to the left in some positions. This does not happen in the rightmost position: $c+d$ equals 9 and not 19.

We examine the digits in the addition from left to right. We see that $a=1$ or $a=2$. The case $a=2$ is ruled out because otherwise $b+a=0$ would hold in the next position. So we have $a=1$ and it must be that $b+a=9$ or $b+a=10$, which means $b=8$ or $b=9$. The second case is ruled out because then in the next position $c+b=1$ would hold. We see that $b=8$ and that $c+b=11$. It follows that $c=3$. Finally, looking at the rightmost position, we find $d+c=9$, so $d=6$. We thus find $n=1836$ and this is indeed a solution because $1836+183=2019$.