%I #21 Apr 29 2023 07:01:48
%S 2,2,1,2,2,0,2,2,1,2,2,0,2,2,1,2,1,0,2,2,1,2,2,0,2,2,1,2,2,0,2,2,1,2,
%T 0,2,2,1,2,2,0,2,2,1,2,2,0,2,2,1,0,2,2,1,2,2,0,2,2,1,2,2,0,2,2,1,2,0,
%U 2,2,1,2,2,0,2,2,1,2,2,0,2,2,1,0,2,2,1,2,2
%N Run lengths of 0's in A282317, the lexicographically first cubefree sequence in {0,1} .
%C In other words: Number of 0's before the first '1' and then between two consecutive '1's in A282317.
%C This sequence is also cubefree: A cube xxx in this sequence would correspond to a cube yyy in A282317, where y is obtained by "decoding" x, i.e., replacing each term x[i] by a run of x[i] "0"s followed by a "1".
%C Also, a(n) = d(n)-1 where d(n) = b(n)-b(n-1) is the first difference of the sequence b which lists the indices of nonzero terms in A282317 (such that A282317 is the characteristic sequence of b), and b(0) := -1.
%e Sequence A282317 starts with a(1) = 2 '0's, then a '1', then again a(2) = 2 '0's followed by a '1' then a(3) = 1 '0's followed by a '1'. Then again a(4) = 2 '0's followed by a '1' and another a(5) = 2 '0's followed by a '1', then a(6) = 0 '0's before the next '1', i.e., the preceding '1' is immediately followed by another '1'. And so on.
%o (PARI) A285930(n,A=A282317_vec(n\.4),c=0)=for(i=1,#A,(A[i]&&c=print1(c","))||c++)
%Y Cf. A282317.
%K nonn
%O 1,1
%A _M. F. Hasler_, May 02 2017
|