Problem

Source: Chinese TST 2007 3rd quiz P2

Tags: combinatorics proposed, combinatorics



Given an integer $ k > 1.$ We call a $ k -$digits decimal integer $ a_{1}a_{2}\cdots a_{k}$ is $ p -$monotonic, if for each of integers $ i$ satisfying $ 1\le i\le k - 1,$ when $ a_{i}$ is an odd number, $ a_{i} > a_{i + 1};$ when $ a_{i}$ is an even number, $ a_{i}<a_{i + 1}.$ Find the number of $ p -$monotonic $ k -$digits integers.