Number of words that can be formed if letters can be repeated as one wants.

Your goal is to form a 24-letter word using the letters of the word EXTRAVAGANZA. How many such words, whether existent or non-existent, can be formed if you are allowed to repeat all the letters as many times as you want?

I worked out smaller cases like 3-letter words with 2 letters and 4-letter words with 3 letters and concluded that the number of ways to do so is the number of letters raised to the number of letters of the word. So my answer to the problem is $$9^{24}$$. Is my answer correct?

• It is. There is just one empty word, and $n+1$-letter word can be formed from one $n$-letter and one $1$-letter. Jul 11 '19 at 10:51
• Your answer is correct. However, you should say the number of distinct letters raised to the number of letters in the word. Jul 11 '19 at 10:54

Since you have $$9$$ distinct letters that you can pick from throughout the selection process, you have $$9$$ choices for the first letter, $$9$$ for the second, and so on up to $$9$$ choices for the last (24th) letter. Hence, there are $$9^{24}$$ possible "words" that can be formed based on the instructions that you stipulated.