Problem

Source: 2021 IMOC qualification problems, C2

Tags: IMOC, combinatorics



Find the largest positive integer $n$ such that no two adjacent digits are the same, and for any two distinct digits $0 \leq a,b \leq 9 $, you can't get the string $abab$ just by removing digits from $n$.