OFFSET
1,1
COMMENTS
Here xy^k means the concatenation of the words x and k copies of y.
The first '6' occurs at a(3908). - Sergio Pimentel, Jul 13 2015
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
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, J. Integer Sequences, Vol. 10 (2007), #07.1.2.
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
N. J. A. Sloane, Mar 10 2004
STATUS
approved