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 whose terms are natural numbers at most equal to . 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 for .