Answer:
(See detailed process below)
Step-by-step explanation:
Let be the number of ways of arranging such flagpole with the given conditions.
a) When arranging a flagpole of n feet high, consider the following cases
If the last flag used is a red flag, then the other flags are n-1 foot high, so they can be seen as arranged on a smaller flagpole of n-1 feet high, which can be done in ways.
Similarly, If the last flag used is a gold flag, then the other flags can be seen as arranged on a smaller flagpole of n-1 feet high. This can be done in ways.
If the last flag used is green, the other flags are n-2 feet high, so the flagpole can be arranged in ways.
Using the sum rule, we obtain that for all n≥3. Listing all the combinations of flags, the initial conditions are .
b) If the last flag used is green, there are ways to choose the other flagd.
If the last flag used is not green, it is a 1 ft flag. It can happen that a green flag was used before, then there are arrangements (counting red and gold). If not, then another 1ft flag was used before (with 4 possible combinations). To satisfy the condition, the flag before those two must be green, and the remaining flags can be chosen in ways.
By the sum rule, for all n≥4.
c) If the last flag used is gold, the condition is always satisfied no matter what flags are used below, then there are ways to arrange the flagpole.
Similarly, If the last flag used is green, there are ways to arrange the flagpole.
If the last flag used is red, the arrangement of n-1 flags below can't use (gold green) as the last flags. Call this kind of arrangement "bad". The number of bad arrangements is (3 ft are fixed gold green) so the number of valid arrangements is .
Using the sum rule, for all n≥3.