Problem

Source: Iranian TST 2018, second exam day 2, problem 6

Tags: combinatorics, Iran, Iranian TST, Sequence



$a_1,a_2,\ldots,a_n$ is a sequence of positive integers that has at least $\frac {2n}{3}+1$ distinct numbers and each positive integer has occurred at most three times in it. Prove that there exists a permutation  $b_1,b_2,\ldots,b_n$ of $a_i $'s such that all the $n$ sums $b_i+b_{i+1}$ are distinct ($1\le i\le n $ , $b_{n+1}\equiv b_1 $) Proposed by Mohsen Jamali