Let $p$ and $q$ be mutually prime natural numbers greater than $1$. Starting with the permutation $(1, 2, . . . , n)$, in one move we can switch the places of two numbers if their difference is $p$ or $q$. Prove that with such moves we can get any another permutation if and only if $n \ge p + q - 1$.
Problem
Source: IFYM - XI International Festival of Young Mathematicians Sozopol 2022, Theme for 11-12 grade,finals p8
Tags: combinatorics, permutations