This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A286940 #40 Jul 26 2017 23:19:25 %S A286940 1,1,1,3,2,7,15,13,1,42,39,42,39,42,28,1,42,39,42,39,42,28,1,42,39,42, %T A286940 39,35,7,32,7,35,7,32,7,35,7,32,4,39,42,39,42,39,35,7,32,7,35,7,32,7, %U A286940 35,7,32,4,39,42,39,42,39,35,7,32,7,35,7,32,7,35,7,32,4,28,1,42,39,42,39 %N A286940 Length of the word appended at the n-th step when trying to construct the earliest infinite cubefree word A282317 by appending the "incremented" longest possible subsequence A282317(0..a(n)-1) with the last term set to 1, for all n > 1. %C A286940 The initial a(0) = 1 corresponds to the initial term S(0) = 0, and a(1) = 1 refers to the 1-element sequence S(0) = 0 which is appended at the first step (S = A282317). This is the only instance where the appended chunk does not end in 1. All other chunks end in 1, i.e., A282317(Sum_{k=1..n} a(k)) = 1 for all n > 1. %C A286940 We can see a pseudo-periodic pattern arise in this sequence (cf. Example), but it cannot be periodic, and must even be cubefree*, else S would not be cubefree. (*Here and below we ignore the initial terms.) %C A286940 It also seems that a(n) is in { 1, 4, 7, 28, 32, 35, 39, 42 } for all n > 7, and furthermore, that 1 is always preceded by 28 and followed by (42, 39, 42, 39), and similarly 4 is always preceded by the same 15 elements (42, ..., 32). (Observation based on 10^4 terms of S, under further investigation.) %C A286940 So far it is not proved that this algorithm never produces a maximal cubefree word (cf. A282133), then necessarily of the form S.S'.1 where S' is an initial segment of S), and then is unable to continue. At least this does not happen before reaching 2*10^4 terms. %H A286940 M. F. Hasler, <a href="/A286940/b286940.txt">Table of n, a(n) for n = 0..742</a> (Lengths of words until the total length exceeds 2*10^4.) %e A286940 Start with S = (0); we set a(0) = 1. %e A286940 Append W = S, of length a(1) = 1, to yields S = (0, 0). %e A286940 Now we can't append W (or even S) again, "increment" it to get W = (1) of length a(2) = 1, and S = (0, 0, 1). %e A286940 Append W = S, of length a(3) = 3, to yields S = (0, 0, 1, 0, 0, 1). %e A286940 We can't append W (or even S) again, a cube would appear at the 3rd appended digit which is already 1. So we must "increment" this (discarding all from the 3rd digit on) to get W = (0, 1) of length a(4) = 2, to yields S = (0, 0, 1, 0, 0, 1, 0, 1). %e A286940 If we try to append W = S we see that there is a cube ending at the penultimate digit, namely three times (0, 1, 0). So we must increase this 7th digit of S to get W = (0, 0, 1, 0, 0, 1, 1) of length a(5) = 7, and so on. %e A286940 The sequence starts %e A286940 1, 1, 1, 3, 2, 7, 15, 13, %e A286940 1, 42, 39, 42, 39, 42, 28, 1, 42, 39, 42, 39, 42, 28, /* =: A,A */ %e A286940 1, 42, 39, 42, 39, 35, 7, 32, 7, 35, 7, 32, 7, 35, 7, 32, 4, /* =: 1,B */ %e A286940 39, 42, 39, 42, 39, 35, 7, 32, 7, 35, 7, 32, 7, 35, 7, 32, 4, /* = 39,B */ %e A286940 39, 42, 39, 42, 39, 35, 7, 32, 7, 35, 7, 32, 7, 35, 7, 32, 4, 28 /* = 39,B,28 */. %e A286940 Then this repeats: A,A, 1,B, 39,B, 39,B,28, /* =: C */ %e A286940 and again: A,A, 1,B, 39,B, 39,B',28, /* =: C' */ %e A286940 where B' is B with its last two elements removed. %e A286940 Then it continues again C, C, C', C, C, C", C, C, C', etc. %e A286940 I conjecture that this goes on with C, C', C"... appearing in a "ternary ruler sequence" pattern (A007949) until the length of the successively truncated B-part reaches length 0. This would be after approximately 12*10^6 terms of the sequence S. %o A286940 (PARI) #A282317_vec(2e4,2^4) \\ verbosity flag 2^4 does print1(#w",") near a=concat(a,w) in the code for A282317. %o A286940 (PARI) A286940_vec(Nmin)={my(a=[1,1,1,3,2,7,15,13], A=[1,42,39,42,39,42,28], B=concat(A[2..5],[35,7,32,7,35,7,32,7,35,7,32,4]), C=concat([A,A,1,B,39,B,39,B]),n=0);while(#a<Nmin,a=concat([a,C[1..-valuation(n++,3)*2-1],28]));a} \\ This returns at least Nmin terms (Nmin < 65*3^8) according to the *conjectured* pattern given in Examples. %K A286940 nonn %O A286940 0,4 %A A286940 _M. F. Hasler_, May 20 2017