We say that a positive integer is guarani if the sum of the number with its reverse is a number that only has odd digits. For example, $249$ and $30$ are guarani, since $249 + 942 = 1191$ and $30 + 03 = 33$. a) How many $2021$-digit numbers are guarani? b) How many $2023$-digit numbers are guarani?
Problem
Source: Cono Sur 2021 #1
Tags: combinatory, counting
01.12.2021 05:41
Acording to what my friends told, the answer to a) its 0 so @StarLex1 its fakesolving once again...
01.12.2021 05:53
StarLex1 wrote: 1....................12=(2020 digits of 1) and 1 digit of 2 and its reverse 211111.........11 it suppose to be an odd that end with 3 read carefully, all of the digit of the sum is odd
01.12.2021 05:55
I think the method to solve this problem is to solve from the middle digit of the sum, and I'm doing by that way
02.12.2021 02:30
For part a) We claim the answer is zero. Let $k_n$ be the $n$th digit of the $2021$-digit $k.$ It's clear that without regrouping, we want $(k_{1}+k_{2021}, k_{2}+k_{2020}, k_{3}+k_{2019}, \dots , k_{2021}+ k_{1}) \equiv 1 \pmod{2}.$ But note that $k_{1011}+k_{1011} \equiv 0 \pmod{2}.$ So we take into account regrouping to attempt to fix this. Notice that to cause regrouping after a sum of any arbitrary digits, we can just maximize both the digits while keeping their parity. Likewise, to "un-regroup" (i.e. do the reverse) we can just minimize both the digits while keeping their parity. Also note that since $k_{r}+k_{2022-r}$ appears twice in the integer (except for $r=1011$) we will have to account for this too by regrouping or changing parity in both instances. Now we rephrase the problem as follows, dividing into two cases. Case 1. $k$ plus its reverse forms a $2021$ digit number. That is, $k_1+k_{2021}$ does not regroup. The above has $2021$ digits $m_1, m_2, m_3, \dots m_{2021}.$ Notice that we can change the parity of both $m_r$ and $m_{2022-r},$ except when $r=1011$ (by changing the parity of $k_r$) or change the parity of both $m_{r}$ and $m_{2020-r}$ (by regrouping or "un-regrouping.") Since there can obviously exist $2021$ even digits (by $111...1+111...1,$ we start with that case. But now notice that when performing a move on odd indices of $m,$ we always change the parity of two odd indices of $m.$ Since there are $1011$ odd indices, it's impossible to change $1011$ even digits into $1011$ odd digits, so this case yields no guarani integers. Case 2. $k$ plus its reverse forms a $2021$ digit number. That is, $k_1+k_{2021}$ regroups. The above has $2022$ digits $1, m_1, m_2, m_3, \dots m_{2021}.$ Disregard the leading $1$ since it never changes, and only consider the $2021$ digit number $m_1, m_2, m_3, \dots m_{2021}.$ Notice that, similarly to Case 1, we can change the parity of both $m_r$ and $m_{2022-r}$ (except when $r=1011$) or change the parity of both $m_r$ and $m_{2020-r}$ (by regrouping or "un-regrouping.") We start with the simple case $999...9+999...9$ which yields $1999...98,$ or, disregarding the $1, 2020$ odd digits followed by the even digit $m_{2021}.$ But now, similarly to before, notice that when performing a move on odd indices of $m,$ we always change the parity of two odd indices of $m.$ Since there are $1011$ odd indices, it is impossible to change $1010$ odd digits and $1$ even digit into $1011$ odd digits, so this case yields no guarani integers as well, so we're done.
10.01.2022 15:54
I'm the author of this problem Okay, so now the solution. Consider the number $N = \overline{a_{1} a_{2} \dots a_{n}}$, which is added to its reversed, $\overline{a_{n} a_{n-1} \dots a_{1}}$, whose result we call $b_{1} b_{2} \dots b_{n}$. Since we are interested only in the parity of the digits, we can take $\mod$ $2$ (if that makes easier the following definition). For every $i = 1, 2 \dots n$, define the pair $(c_i, d_i)$, where $c_i$ is $1$ iff $a_i - a_{n+1-i} \equiv 1 (mod$ $2)$, and $d_{i} = 1$ iff $a_{i} + a_{n+1-i} \leq 9$. We define $d_{0} = 1$. For all $b_{i}$'s to be $1$ ($mod$ $2)$, we need $c_{i} = d_{i-1}$, for all $i \geq 1$. By symmetry, we obtain $c_{i} = c_{n+1-i}$ and $d_{i} = d_{n+1-i}$, and with $c_{i} = d_{i-1}$, which implies $c_{n+1-i} = d_{n+2-i}$, and therefore $d_{i-1} = c_{i} = d_{i+1} = c_{i+2}$. As $n$ is odd, we write $n = 2k+1$, We have $c_{1} = 1$, in order for $b_{1}$ to be odd, and $c_{k+1} = 0$, as $a_{k+1} = a_{n+1 - (k+1)}$. If $k$ is even, then $k+1$ is odd, so $1 = c_{1} = c_{k+1} = 0$. Contradiction If $k$ is odd, then, for $i$ odd, we have $(c_{i}, d_{i}) = (1, 0)$, and for $i$ even, $(c_{i}, d_{i}) = (d_{i-1}, c_{i+1}) = (0, 1)$. There are $20$ ordeder pairs of digits $(a_{i}, a_{n+1-i})$ which satisfy the first condition ($i$ odd), and $25$ pairs which satisfy the second condition. So, for $a)$, we note that its corresponding $k$ is even, so there are no guarani numbers. For $b)$, by the multiplicative principle, and $2023 = n = 2 \times 1011 + 1$, we obtain $20$ choices which generate $(c_1, d_1)= (1, 0)$, 25 choices which generate $(c_2, d_2) = (0, 1)$ $\dots$ $20$ choices which generate $(c_k, d_k) = (1, 0)$, and finally, $5$ choices for $(c_{k+1}, d_{k+1}) = (0, 1)$. The final answer must be therefore the product of all these posibilities, that is, $$ 100 \times 500^{505} $$