3. For any four-element subset $\mathrm{P}$ of the set $\{1,2,3, \ldots, 12\}$, denote

$$
\mathrm{Q}=\{3 x: x \in \mathrm{P}\} \quad \text { and } \quad \mathrm{R}=\{4 x: x \in \mathrm{P}\} \text {. }
$$

Determine the number of such sets $P$ for which the numbers from $P, Q, R$ give all possible non-zero remainders when divided by 13.

(Jaromír Šimša)
Solution. We will calculate with all numbers modulo 13, i.e., as remainders upon division by 13. Furthermore, it is clear that not only the set $P$, but also the derived sets $Q$ and $R$ are four-element sets. Therefore, if the three mentioned sets are to contain all non-zero remainders modulo 13, of which there are twelve, they must be mutually disjoint.

Let $\mathrm{P}$ be any set satisfying the conditions of the problem and let $x \in \mathrm{P}$. Then from the incidences $3 x \in \mathrm{Q}$ and $4 x \in \mathrm{R}$ it follows that the number $12 x=3 \cdot 4 x=4 \cdot 3 x$ does not belong to $\mathrm{Q}$ nor to $\mathrm{R}$, because $4 x$ and $3 x$ do not belong to $\mathrm{P}$ and every two different numbers have different triplets and different quadruplets. Therefore, $12 x \in \mathrm{P}$ and also

$$
3 \cdot 12 x=10 x \in \mathrm{Q} \quad \text { and } \quad 4 \cdot 12 x=9 x \in \mathrm{R} .
$$

The six numbers $(x, 4 x, 3 x, 12 x, 9 x, 10 x)$, arranged as ( $\mathrm{P}, \mathrm{R}, \mathrm{Q}, \mathrm{P}, \mathrm{R}, \mathrm{Q})$, have the additional property, which is easy to verify, that each of its subsequent members is (modulo 13) the quadruple of the previous number, which is also true cyclically, i.e., for the last and the first member.

All numbers from 1 to 12 form two cyclic sextets of the described type

$$
(1,4,3,12,9,10) \quad \text { and } \quad(2,8,6,11,5,7)
$$

and to determine a suitable set $\mathrm{P}$, it is sufficient to specify which of the three used colors the numbers in $\mathrm{P}$ have - independently in each of the two sextets. The sought number is therefore equal to $3 \times 3=9$.