2013 AIME II Problems/Problem 9
A board is completely covered by tiles without overlap; each tile may cover any number of consecutive squares, and each tile lies completely on the board. Each tile is either red, blue, or green. Let be the number of tilings of the board in which all three colors are used at least once. For example, a red tile followed by a green tile, a green tile, a blue tile, and a green tile is a valid tiling. Note that if the blue tile is replaced by two blue tiles, this results in a different tiling. Find the remainder when is divided by .