Find a way to write all the digits of $1$ to $9$ in a sequence and without repetition, so that the numbers determined by any two consecutive digits of the sequence are divisible by $7$ or $13$.
Problem
Source: Lusophon 2019 CPLP P1
Tags: number theory, Digits, divisible
01.06.2020 04:38
$784913526$ And i believe its the only one.
22.05.2024 16:36
It is the only solution.
22.05.2024 16:57
The idea here is to list all two digit numbers multiples of $7$ and $13$ which are respectively $(14,21,28,35,42,49,56,63,70,77,84,91)$ $(13,26,39,52,65,78,91)$ and we since we can only use 1 number once the $77$ isn't useful and notice that $7$ must be the first number in this sequence because they aren't numbers who finish with a $7$ here, so we must start with $7$ therefore $8$ is the next one because $13|78$ and it's the only number that will satisfy what we want and after that we must have $784$ for the same reason as before and next $7849$ or $7842$ and notice that if you choose $9$ then $1$ must be the next one because $91$ is the only number that works here so just keep repeating this process and checking all cases(which aren't many) and you'll get $784913526$.