Problem

Source:

Tags: combinatorics



Find all permutations of the numbers $1,2,\ldots,9$ in which no two adjacent numbers have a sum divisible by $7$ or $13$.