It's a fairly straight forward one i think, but its been a long time since a studied maths!
The problem is...
There are 6 slots in a row.
One tab can be inserted into each slot.
There are 6 different coded tabs (e.g. 1, 2, 3, 4, 5, 6)
Therefore the total number of cominations is 6^6.
However, three or more tabs of the same code cannot lie next to each other.
i.e. the following combinations cannot exist:
etc..... because there are 3 or more tabs of the same code next to each other.
What is the total number of allowable combinations?