Each square below is to be colored either red, yellow, or blue, so that no two consecutive squares have the same color. How many ways are there to color the squares?

There are 25,480 ways of coloring the squares.