Determine the number of $2021$-tuples of positive integers such that the number $3$ is an element of the tuple and consecutive elements of the tuple differ by at most $1$. Walther Janous (Austria)
Problem
Source: 2021 Czech-Polish-Slovak Match, P4
Tags:
Kamran011
03.08.2021 12:53
It is All-Russian 2015 Regional/9.8
Jjesus
15.08.2021 21:59
any solution?
ztxtsl
11.12.2021 17:43
Kamran011 wrote: It is All-Russian 2015 Regional/9.8 sure???
Kamran011
11.12.2021 18:02
@above yes, here's the original problem ARO 2015 Regional/9.8 wrote: Петя хочет выписать все возможные последовательности из $100$ натуральных чисел, в каждой из которых хотя бы раз встречается тройка, а любые два соседних члена различаются не больше, чем на $1$. Сколько последовательностей ему придётся выписать?
sarjinius
21.07.2022 20:31
first aops sol since retiring from oly math
Note that all $2021$-tuples $(a_1, a_2, \dots, a_{2021})$ of positive integers whose smallest element is at most $3$ such that consecutive elements differ by at most $1$ can be uniquely defined by $(b_1, b_2, \dots, b_{2020})$, where $b_i = a_{i+1} - a_i$ for $i = 1, 2, \dots, 2020$ and each $b_i$ can be $-1, 0$, or $1$, and the smallest element of the tuple, which can be $1$, $2$, or $3$. There are a total of $3 \cdot 3^{2020} = 3^{2021}$ such tuples. But these include tuples that only include $1$s and $2$s, of which there are $2^{2021}$ of them. Thus, the number of tuples that satisfy the problem condition is $\boxed{3^{2021} - 2^{2021}}$.