2010 Hong kong National Olympiad

1

Let $ABC$ be an arbitrary triangle. A regular $n$-gon is constructed outward on the three sides of $\triangle ABC$. Find all $n$ such that the triangle formed by the three centres of the $n$-gons is equilateral.

2

Let $n$ be a positive integer. Find the number of sequences $x_{1},x_{2},\ldots x_{2n-1},x_{2n}$, where $x_{i}\in\{-1,1\}$ for each $i$, satisfying the following condition: for any integer $k$ and $m$ such that $1\le k\le m\le n$ then the following inequality holds \[\left|\sum_{i=2k-1}^{2m}x_{i}\right|\le\ 2\]

3

Let $n$ be a positive integer. Let $a$ be an integer such that $\gcd (a,n)=1$. Prove that \[\frac{a^{\phi (n)}-1}{n}=\sum_{i\in R}\frac{1}{ai}\left[\frac{ai}{n}\right]\pmod{n}\] where $R$ is the reduced residue system of $n$ with each element a positive integer at most $n$.