Mr. Schwartz has been hired to paint a row of 7 houses. Each house must be painted red, blue, or green. However, to make it aesthetically pleasing, he doesn’t want any three consecutive houses to be the same color. Find the number of ways he can fulfill his task
I wrote a code to find the answer. I tried all 37 possibilities of painting the houses, and filtered out those which doesn't satisfy the condition. In total, there are 1344 ways to paint the houses.
Here is my source code: https://pastebin.com/04c3EeUn
I would just like to say that this question is on the MBMT Math tournament and that you are basically making fun of all the other teams like mine that spent hours trying to solve this problem where you just took 2 minutes out of your day to post it on this website acting like an innocent person seedind help on his homework.