Problem

Source: Mexico National Olympiad 2018 Problem 3

Tags: number theory, relatively prime



A sequence $a_2, a_3, \dots, a_n$ of positive integers is said to be campechana, if for each $i$ such that $2 \leq i \leq n$ it holds that exactly $a_i$ terms of the sequence are relatively prime to $i$. We say that the size of such a sequence is $n - 1$. Let $m = p_1p_2 \dots p_k$, where $p_1, p_2, \dots, p_k$ are pairwise distinct primes and $k \geq 2$. Show that there exist at least two different campechana sequences of size $m$.