A bag contains red and blue tiles. Each tile has a number from the set written on it. I want to arrange of these tiles in a row, so that the numbers on any three consecutive tiles sum to . In how many ways can this be done, assuming that there are an unlimited number of tiles for any color and number combination?
\(\text{Suppose you want the numbers of 3 consecutive tiles to sum to $N$}\\ \text{Further let's assume that the set you refer to has $M$ numbers in it}\\ \text{We want the number of 3 element partitions of $N$ from the elements of the set}\\ \text{This is equivalent to sorting $N$ balls into $M$ bins}\\ \text{The number of ways this can be done is given by the stars and bars problem (google) and is}\\ \dbinom{N+M-1}{M-1}\\ \text{Tiles can additionally be colored red or blue. This gives an additional factor of $2^L,\\$ where $L$ is the length of the row of tiles.}\\ \text{So if your row is length $L$ the number of arrangements is }\\ 2^L \dbinom{N+M-1}{M-1}\)
.