OFFSET
1,6
COMMENTS
Same as A055186, except previous pairs from the same row are included in the count.
EXAMPLE
Write "0". There is now "1 0". Now there is "1 1". We can't find any terms greater than 1, so we recheck the sequence for 0s and find "2 0(s)". Listing these terms in the order read out loud yields the sequence "0, 1, 0, 1, 1, 2, 0, ...".
PROG
(PARI) seq(n)={my(L=List([0]), m=0, k=0); while(#L<n, my(c=#select(t->t==k, L)); if(c, listput(L, c); listput(L, k); m=max(m, c)); k=if(k==m, 0, k+1)); Vec(L)} \\ Andrew Howroyd, May 02 2023
CROSSREFS
KEYWORD
AUTHOR
Robin Powell, Apr 24 2023
STATUS
approved