

A289359


Image of 0 under repeated application of the morphism phi = {x > x,x+1,x+2 if x mod 3 = 0; x > x1 if x mod 3 = 1; or x > x+2 if x mod 3 = 2, for x = 0,1,2,3,...}.


0



0, 1, 2, 0, 4, 0, 1, 2, 3, 0, 1, 2, 0, 4, 3, 4, 5, 0, 1, 2, 0, 4, 0, 1, 2, 3, 3, 4, 5, 3, 7, 0, 1, 2, 0, 4, 0, 1, 2, 3, 0, 1, 2, 0, 4, 3, 4, 5, 3, 4, 5, 3, 7, 3, 4, 5, 6, 0, 1, 2, 0, 4, 0, 1, 2, 3, 0, 1, 2, 0, 4, 3, 4, 5, 0, 1, 2, 0, 4, 0, 1, 2, 3, 3, 4, 5, 3, 7, 3, 4, 5, 3, 7, 3, 4, 5, 6, 3, 4, 5, 3, 7, 6, 7, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Similar to A288577, except the "x1" term causes this sequence to return to 0 infinitely often, whereas A288577 is only 0 at the 0th term.
This is the limit of a series of iterations. The length of each iteration is given by A000213, beginning with the second term of that sequence (1, 3, 5, 8, 17, etc.):
0
0, 1, 2
0, 1, 2, 0, 4
0, 1, 2, 0, 4, 0, 1, 2, 3
0, 1, 2, 0, 4, 0, 1, 2, 3, 0, 1, 2, 0, 4, 3, 4, 5
When written in blocks in this way, each subsequent block is the concatenation of the previous block, the secondprevious block, and the thirdprevious block, with each term incremented by 3.


LINKS

Table of n, a(n) for n=0..104.


MATHEMATICA

SubstitutionSystem[{x_ > Switch[Mod[x, 3], 0, {x, x+1, x+2}, 1, {x1}, 2, {x+2}]}, {0}, 7] // Last (* JeanFrançois Alcover, Jan 21 2018 *)


CROSSREFS

Sequence in context: A227311 A178515 A051517 * A053118 A279228 A181481
Adjacent sequences: A289356 A289357 A289358 * A289360 A289361 A289362


KEYWORD

nonn


AUTHOR

Kerry Mitchell, Jul 03 2017


STATUS

approved



