cp's OEIS Frontend

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.

A357063 Lengths of the B blocks associated with A091787.

This page as a plain text file.
%I A357063 #31 Nov 22 2022 22:36:40
%S A357063 1,4,13,42,127,382,1149,3448,10345,31044,93133,279400,838203,2514610,
%T A357063 7543831,22631496,67894489,203683468,611050413,1833151240,5499453721,
%U A357063 16498361166,49495083499,148485250498,445455751497,1336367254492,4009101763477,12027305290463,36081915871390,108245747614173,324737242842520,974211728527561,2922635185582686,8767905556748059,26303716670244178,78911150010732543,236733450032197630,710200350096592891
%N A357063 Lengths of the B blocks associated with A091787.
%C A357063 The B blocks are explained in the article "A slow-growing sequence defined by an unusual occurrence". They have superscript (2).
%H A357063 F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Sloane/sloane55.html">A Slow-Growing Sequence Defined by an Unusual Recurrence</a>, J. Integer Sequences, Vol. 10 (2007), Article 07.1.2.
%e A357063 The third B-block of order 2 is B_3^{(2)}=2223222322233. Therefore, a(3)=13.
%o A357063 (Python)
%o A357063 number_of_terms=38
%o A357063 def Cn(X):
%o A357063     l=len(X)
%o A357063     cn=1
%o A357063     for i in range(1,int(l/2)+1):
%o A357063         j=i
%o A357063         while(X[l-j-1]==X[l-j-1+i]):
%o A357063             j=j+1
%o A357063             if j>=l:
%o A357063                 break
%o A357063         candidate=int(j/i)
%o A357063         if candidate>cn:
%o A357063             cn=candidate
%o A357063     return cn
%o A357063 # This algorithm generates a prefix of the level-3 Gijswijt sequence
%o A357063 def Generate_A3(number):
%o A357063   glue_lengths=[]
%o A357063   A3=[3]
%o A357063   S=[3]
%o A357063   i=0
%o A357063   while(True):
%o A357063       c=Cn(A3)
%o A357063       if c<3:
%o A357063         glue_lengths.append(len(S))
%o A357063         i=i+1
%o A357063         if i==number:
%o A357063             break
%o A357063         S=[]
%o A357063       A3.append(max(c,3))
%o A357063       S.append(max(c,3))
%o A357063   return glue_lengths
%o A357063 glue_lengths=Generate_A3(number_of_terms-1)
%o A357063 beta_lengths=[1]
%o A357063 beta_length=1
%o A357063 for l in glue_lengths:
%o A357063     beta_length=3*beta_length+l
%o A357063     beta_lengths.append(beta_length)
%o A357063 print(beta_lengths)
%Y A357063 Cf. A091787, A357068.
%K A357063 nonn
%O A357063 1,2
%A A357063 _Levi van de Pol_, Sep 10 2022
%E A357063 By special permission, more than the usual number of terms are shown. - _N. J. A. Sloane_, Oct 23 2022