A287566 Start with 0 and repeatedly substitute 0->0231, 1->2310, 2->3102, 3->1023.
0, 2, 3, 1, 3, 1, 0, 2, 1, 0, 2, 3, 2, 3, 1, 0, 1, 0, 2, 3, 2, 3, 1, 0, 0, 2, 3, 1, 3, 1, 0, 2, 2, 3, 1, 0, 0, 2, 3, 1, 3, 1, 0, 2, 1, 0, 2, 3, 3, 1, 0, 2, 1, 0, 2, 3, 2, 3, 1, 0, 0, 2, 3, 1, 2, 3, 1, 0, 0, 2, 3, 1, 3, 1, 0, 2, 1, 0, 2, 3, 3, 1, 0, 2, 1, 0
Offset: 1
Examples
First three iterations of the morphism: 0231 0231310210232310 0231310210232310102323100231310223100231310210233102102323100231
Programs
-
Mathematica
s = Nest[Flatten[# /. {0 -> {0, 2, 3, 1}, 1 -> {2, 3, 2, 0}, 2 -> {3, 1, 0, 2}, 3 -> {1, 0, 2, 3}}] &, {0}, 9]; (* A287566 *) Flatten[Position[s, 0]]; (* A287567 *) Flatten[Position[s, 1]]; (* A287568 *) Flatten[Position[s, 2]]; (* A287569 *) Flatten[Position[s, 3]]; (* A287570 *) Flatten[SubstitutionSystem[{0->{0,2,3,1},1->{2,3,1,0},2->{3,1,0,2},3->{1,0,2,3}},{0},{4}]] (* Harvey P. Dale, Jul 20 2023 *)
Formula
a(n) = 4n - A287568(n) for n >= 1.
Comments