MathDB
a_i = natural at most n, a_p = a_r \ne a_q = a_s

Source: Czech and Slovak Olympiad 1989, National Round, Problem 6

September 13, 2024
combinatoricsCombinatorial Number TheorySequenceNumber sequencenational olympiad

Problem Statement

Consider a finite sequence a1,a2,...,ana_1, a_2,...,a_n whose terms are natural numbers at most equal to nn. Determine the maximum number of terms of such a sequence, if you know that every two of its neighboring terms are different and at the same time there is no quartet of terms in it such that ap=araq=asa_p = a_r \ne a_q = a_s for p<q<r<sp < q < r < s.