Problem

Source: 2011 Romania JBMO TST 2.3

Tags: number theory, Digits, Sum, multiple



a) Prove that if the sum of the non-zero digits $a_1, a_2, ... , a_n$ is a multiple of $27$, then it is possible to permute these digits in order to obtain an $n$-digit number that is a multiple of $27$. b) Prove that if the non-zero digits $a_1, a_2, ... , a_n$ have the property that every ndigit number obtained by permuting these digits is a multiple of $27$, then the sum of these digits is a multiple of $27$