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?
Suppose you want the numbers of 3 consecutive tiles to sum to NFurther let's assume that the set you refer to has M numbers in itWe want the number of 3 element partitions of N from the elements of the setThis is equivalent to sorting N balls into M binsThe number of ways this can be done is given by the stars and bars problem (google) and is(N+M−1M−1)Tiles can additionally be colored red or blue. This gives an additional factor of 2L, where L is the length of the row of tiles.So if your row is length L the number of arrangements is 2L(N+M−1M−1)
.