An [integer](https://artofproblemsolving.com/wiki/index.php/Integer) is called parity-monotonic if its decimal representation $a_{1}a_{2}a_{3}\cdots a_{k}$ satisfies $a_{i}a_{i+1}$ if $a_{i}$ is [even](https://artofproblemsolving.com/wiki/index.php/Even). How many four-digit parity-monotonic integers are there?
Let's set up a table of values. Notice that 0 and 9 both cannot appear as any of $a_1,\ a_2,\ a_3$ because of the given conditions. (Also note that 0 cannot appear as 0 cannot be the first digit of an integer.) A clear pattern emerges.
For example, for $3$ in the second column, we note that $3$ is less than $4,6,8$, but greater than $1$, so there are four possible places to align $3$ as the second digit.



Digit  
1st  
2nd  
3rd  
4th


0
0
0
0
64


1
1
4
16
64


2
1
4
16
64


3
1
4
16
64


4
1
4
16
64


5
1
4
16
64


6
1
4
16
64


7
1
4
16
64


8
1
4
16
64


9
0
0
0
64

For any number from 1-8, there are exactly 4 numbers from 1-8 that are odd and less than the number or that are even and greater than the number (the same will happen for 0 and 9 in the last column). Thus, the answer is $4^{k-1} \cdot 10 = 4^3\cdot10 = 640$.