A287576 Start with 0 and repeatedly substitute 0->0321, 1->3210, 2->2103, 3->1032.
0, 3, 2, 1, 1, 0, 3, 2, 2, 1, 0, 3, 3, 2, 1, 0, 3, 2, 1, 0, 0, 3, 2, 1, 1, 0, 3, 2, 2, 1, 0, 3, 2, 1, 0, 3, 3, 2, 1, 0, 0, 3, 2, 1, 1, 0, 3, 2, 1, 0, 3, 2, 2, 1, 0, 3, 3, 2, 1, 0, 0, 3, 2, 1, 1, 0, 3, 2, 2, 1, 0, 3, 3, 2, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 1, 0
Offset: 1
Examples
First three iterations of the morphism: 0321 0321103221033210 0321103221033210321003211032210321033210032110321032210332100321
Links
Programs
Formula
a(n) = 4n - A287578(n) for n >= 1.
Comments