It shouldn’t repeat continuously. Once each learned element in a repeating sequence has bursted the second time (so first element will burst three times), the representations for all elements in the sequence should stabilize.
Note that I haven’t actually tested this particular scenario in NuPIC itself, so I don’t know if there is some slight logical difference in my own implementation (I’ll have to check). Here is a demo I wrote which visualizes the TM process similar to your drawings above (mouse over cells to see how they are connected)
Just use C D and E instead of A B and C since it is a piano. It should stabilize after the following point in the repeating sequence (bold indicates elements where it will burst): “CDECDECDECDECDEC”.
There is a different problem, however, which may be related if there is in fact a logical difference between my implementation and NuPIC. I have discussed it on another thread. Some of the columns end up with two cells representing the same context (with one connected a bit better than the other). This of course impacts the overall capacity of the system. I think it should be possible to tweak the learning process a bit so that the best connected of the two will eventually win out.