Word Triangles

A word triangle is created by taking a word, putting the first letter on the first line, putting two of the second letter on the next line, three of the third letter on the third line, et cetera. Given the word TEASER, the word triangle would look like this:

T
EE
AAA
SSSS
EEEEE
RRRRRR

If you begin at the top and start spelling TEASER by either moving to the letter directly below the letter you are currently on or by moving to the letter that is immediately to the right of the letter below the letter you are currently on, you could use several different paths to spell the word. For instance, if your path takes you to the third 'A' you could either go to the third 'S' or the fourth 'S', but not to the first or second 'S'.

Can you determine how many possible paths there are for this word triangle? How about for word triangles with words of different lengths?

Hint

This relates to the work of a famous theologian and mathematician.Hide

Answer

2^5 = 32

For any word of given length, L, the number of paths, P, can be found by P = 2^(L-1).

This is essentially Pascal's Triangle. Usually, these are seen as more of a pyramid shape, but since spacing can't be done consistently, the teaser had to limit the paths to either the letter below the current letter or the letter below and to the right of the current letter.Hide

I didn't read carefully enough at first and started solving the non-trivial problem where you're not restricted from ever moving left. I caught my error before going too far down this road and the answer to the teaser was immediately obvious. However, the original problem I started to solve seemed interesting, so I continued.

The solution for this alternate problem for 6 letters is 96. For 1 to 10 letters the solutions are:

1, 2, 5, 13, 35, 96, 267, 750, 2123, 6046

There doesn't appear to be a formula to compute the answer for the nth line that doesn't involve either a summation or a generating function. After failing to crack it I looked it up on OEIS (see http://www.research.att.com/~njas/sequences/ A005773).