Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2008-part-01 — 165 problems (EN–VI) Question 134

Math Olympiad Vault · MathNet 2008-part-01 — 165 problems (EN–VI)

Question 134

Let $n$ be a positive integer, and $f(n)$ denote the number of $n$-digit integers $\overline{a_1a_2\cdots a_n}$ (called wave number) that satisfy the following conditions:
(i) $a_i \in \{1, 2, 3, 4\}$, and $a_i \neq a_{i+1}$, $i = 1, 2, \dots$;
(ii) When $n \ge 3$, the numbers $a_i - a_{i+1}$ and $a_{i+1} - a_{i+2}$ have opposite signs, $i = 1, 2, \dots$.
Find (1) the value of $f(10)$,
(2) the remainder of $f(2008)$ divided by 13.