MathDB
wave numbers

Source: China south east mathematical Olympiad 2008 day2 problem 8

July 15, 2013
number theory unsolvednumber theory

Problem Statement

Let nn be a positive integer. f(n)f(n) denotes the number of nn-digit numbers a1a2an\overline{a_1a_2\cdots a_n}(wave numbers) satisfying the following conditions : (i) for each ai{1,2,3,4}a_i \in\{1,2,3,4\}, aiai+1a_i \not= a_{i+1}, i=1,2,i=1,2,\cdots; (ii) for n3n\ge 3, (aiai+1)(ai+1ai+2)(a_i-a_{i+1})(a_{i+1}-a_{i+2}) is negative, i=1,2,i=1,2,\cdots. (1) Find the value of f(10)f(10); (2) Determine the remainder of f(2008)f(2008) upon division by 1313.