How many different "Dwayne" "The Rock" "Johnson" orderings can be made for $n$ Dwayne The Rock Johnsons?

83 Views Asked by At

Let me explain. Whenever I hear Dwayne Johnson's name, I immediately start mixing it up in weird ways by saying his name and nickname multiple times but in random orders. For example "Dwayne" "The Rock" "Dwayne" "The Rock" "Johnson" "Johnson". But I always follow the same set of rules:

  • If I say a number of "Dwayne"'s, $n$, I have to say the other two items "The Rock" and "Johnson" $n$ times as well. Basically the full name needs to be said a whole number of times throughout the expression.
  • If I say "The Rock" it must be because I said a corresponding "Dwayne" sometime before it. For example: "Dwayne" "The Rock" "The Rock" "Dwayne" "Johnson" "Johnson" is not valid. The same is the case for the "Johnson"'s after "The Rock". i.e. They have to appear in order.

So my question is:

For a given number $n$ of "Dwayne", "The Rock", and "Johnson"'s how many different Dwayne The Rock Johnson orderings can I have that follow these rules.

1

There are 1 best solutions below

1
On BEST ANSWER

OEIS: A005789

Number of words consisting of n 'x' letters, n 'y' letters and n 'z' letters such that the 'x' count is always greater than or equal to the 'y' count and the 'y' count is always greater than or equal to the 'z' count; e.g., for n=2 we have xxyyzz, xxyzyz, xyxyzz, xyxzyz and xyzxyz.

In this case, 'x' is "Dwayne", 'y' is "The Rock" and 'z' is "Johnson".