

A090822


Gijswijt's sequence: a(1) = 1; for n>1, a(n) = largest integer k such that the word a(1)a(2)...a(n1) is of the form xy^k for words x and y (where y has positive length), i.e., the maximal number of repeating blocks at the end of the sequence so far.


76



1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 2, 3, 2, 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 2, 3, 2, 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Here xy^k means the concatenation of the words x and k copies of y.
The name "Gijswijt's sequence" is due to N. J. A. Sloane, not the author!
Fix n and suppose a(n) = k. Let len_y(n) = length of shortest y for this k and let len_x = n1  k*len_y(n) = corresponding length of x. A091407 and A091408 give len_y and len_x. For the subsequence when len_x = 0 see A091410 and A091411.
The first 4 occurs at a(220) (see A091409).
The first 5 appears around term 10^(10^23).
We believe that for all N >= 6, he first time N appears is at about position 2^(2^(3^(4^(5^...^(N1))))).  N. J. A. Sloane and Allan Wilks, Mar 14 2004
In the first 100000 terms the fraction of [1's, 2's, 3's, 4's] seems to converge, to about [.287, .530, .179, .005] respectively.  Allan Wilks, Mar 04 2004
When k=12 is reached, say, it is treated as the number 12, not as 1,2. This is not a basedependent sequence.
Does this sequence have a finite average? Does anyone know the exact value?  Franklin T. AdamsWatters, Jan 23 2008
Answer: Given that "...the fraction of [1's, 2's, 3's, 4's] seems to converge, to about [.287, .530, .179, .005]..." that average should be the dot product of these vectors, i.e., about 1.904.  M. F. Hasler, Jan 24 2008
Which is the first step with two consecutive 4's? Or the shortest run found so far between two 4's?  Sergio Pimentel, Oct 10 2016


REFERENCES

N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93110.


LINKS

N. J. A. Sloane, Table of n, a(n) for n = 1..24000
Andreas Abel and Andres Loeh, Haskell program for A090822
F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, A SlowGrowing Sequence Defined by an Unusual Recurrence, J. Integer Sequences, Vol. 10 (2007), #07.1.2.
B. Chaffin, J. P. Linderman, N. J. A. Sloane and Allan Wilks, On Curling Numbers of Integer Sequences, arXiv:1212.6102 [math.CO], Dec 25 2012.
B. Chaffin, J. P. Linderman, N. J. A. Sloane and Allan Wilks, On Curling Numbers of Integer Sequences, Journal of Integer Sequences, Vol. 16 (2013), Article 13.4.3.
Benjamin Chaffin and N. J. A. Sloane, The Curling Number Conjecture, preprint.
D. C. Gijswijt, Krulgetallen, Pythagoras, 55ste Jaargang, Nummer 3, Jan 2016, (Article in Dutch about this sequence, see pages 1013, cover and back cover).
N. J. A. Sloane, Seven Staggering Sequences.
N. J. A. Sloane, Confessions of a Sequence Addict (AofA2017), slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
Index entries for sequences related to Gijswijt's sequence
Index entries for sequences related to curling numbers


MAPLE

K:= proc(L)
local n, m, k, i, b;
m:= 0;
n:= nops(L);
for k from 1 do
if k*(m+1) > n then return(m) fi;
b:= L[k..1];
for i from 1 while i*k <= n and L[i*k .. (i1)*k1] = b do od:
m:= max(m, i1);
od:
end proc:
A[1]:= 1:
for i from 2 to 220 do
A[i]:= K([seq(A[j], j=1..i1)])
od:
seq(A[i], i=1..220); # Robert Israel, Jul 02 2015


MATHEMATICA

ClearAll[a]; reversed = {a[2]=1, a[1]=1}; blocs[len_] := Module[{bloc1, par, pos}, bloc1 = Take[reversed, len]; par = Partition[ reversed, len]; pos = Position[par, bloc_ /; bloc != bloc1, 1, 1]; If[pos == {}, Length[par], pos[[1, 1]]  1]]; a[n_] := a[n] = Module[{an}, an = Table[{blocs[len], len}, {len, 1, Quotient[n1, 2]}] // Sort // Last // First; PrependTo[ reversed, an]; an]; A090822 = Table[a[n], {n, 1, 99}] (* JeanFrançois Alcover, Aug 13 2012 *)


PROG

(Haskell) see link.
(PARI) A090822(n, A=[])={while(#A<n, my(k=1, L=0, m=k); while((k+1)*(L+1)<=#A, for(N=L+1, #A/(m+1), A[m*N..1]==A[(m+1)*N..N1]&&(m+=1)&&break); m>kbreak; k=m); A=concat(A, k)); A} \\ M. F. Hasler, Aug 08 2018


CROSSREFS

Cf. A091407, A091408, A091409 (records), A091410, A091411, A091579, A091586, A091970, A093955A093958.
A091412 gives lengths of runs. A091413 gives partial sums.
Cf. also A094004, A160766, A217206, A217207.
Generalizations: A094781, A091975, A091976, A092331A092335.
Sequence in context: A053633 A216460 A156755 * A091975 A091976 A267825
Adjacent sequences: A090819 A090820 A090821 * A090823 A090824 A090825


KEYWORD

nonn,nice


AUTHOR

Dion Gijswijt, Feb 27 2004


STATUS

approved



