|
|
A091844
|
|
a(1) = 4. To get a(n+1), write the string a(1)a(2)...a(n) as xy^k for words x and y (where y has positive length) and k is maximized, i.e., k = the maximal number of repeating blocks at the end of the sequence so far. Then a(n+1) = max(k,4).
|
|
8
|
|
|
4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 4, 4, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Here xy^k means the concatenation of the words x and k copies of y.
|
|
LINKS
|
F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, A Slow-Growing Sequence Defined by an Unusual Recurrence [pdf, ps].
|
|
MATHEMATICA
|
maxBlockLength = 100; a[1] = 4; a[n_] := a[n] = Module[{rev = Reverse[Array[a, n - 1]]}, blockCount[blockLength_] := Module[{par, p1, k}, par = Partition[rev, blockLength]; If[par == {}, Return[1]]; p1 = First[par]; k = 1; While[k <= Length[par], If[par[[k]] != p1, Break[], k++]]; k - 1]; Max[Max[Array[blockCount, maxBlockLength]], 4]]; Array[a, 100] (* Michael De Vlieger, Jul 13 2015, after Jean-François Alcover at A091799 *)
|
|
PROG
|
(PARI) {A091844(Nmax, L=1, A=List(), f(A, m=3, L=0)=while( #A>=(m+1)*L++, while( A[#A-L*m+1..#A]==A[#A-L*(m+1)+1..#A-L], (m+++1)*L>#A&& break)); m, t) = while(#A<Nmax, for(j=1, 4, L=4*L+1; listput(A, 4)); while(3 < t=f(Vec(A)), listput(A, t); L++)); Vec(A)} \\ The variable L, not needed here, yields the position of corresponding terms in sequence A091799. - M. F. Hasler, Sep 30 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|