I am aware this combinatoric problem (which I got from Discrete Mathematics Elementary and Beyond) has been answered on here before, but from what I can tell the solution I have come up with is different than the answers on other posts but I am not sure so I would like to see where my thought process is wrong.
My solution was originally:
$$3!\cdot3^{n-3}$$
My rationale was:
The first one has the option of 3 colors. Second, two, and the third, one. Each one after that can have any 3 colors since we've met our initial requirements. The below 'diagram' shows how many options each object has for colors.
----- ----- ----- ----- ----- -----
| 3 | | 2 | | 1 | | 3 | | 3 | | 3 |
----- ----- ----- ----- ----- ----- ....
To me this makes sense for the answer, similarly to string combination problems. However it appears that my answer yields numbers different to the correct answer people arrive at using the Inclusion-Exclusion principal formula. Could someone explain how this is yields the wrong answer? I am assuming I am not accounting for all cases in some way.
I am seeing the following as a correct answer in the case of distinctly labeled answers
$$3^n - (2^n)\cdot{{3}\choose{2}} + 1^n\cdot{{3}\choose{1}}$$
Which for this specific problem reduces to:
$$3^n - 2^n\cdot3 + 3$$