MathDB
A sequence $(a_1,a_2,\ldots,a_n)$ of length is called $balanced$

Source: Moldova TST 2023

April 7, 2023
combinatorics

Problem Statement

Let n n be a positive integer. A sequence (a1,a2,,an)(a_1,a_2,\ldots,a_n) of length is called balancedbalanced if for every k k (1kn)(1\leq k\leq n) the term ak a_k is equal with the number of distinct numbers from the subsequence (a1,a2,,ak).(a_1,a_2,\ldots,a_k). a) How many balanced sequences (a1,a2,,an)(a_1,a_2,\ldots,a_n) of length n n do exist? b) For every positive integer mm find how many balanced sequences (a1,a2,,an)(a_1,a_2,\ldots,a_n) of length n n exist such that an=m.a_n=m.