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.

Showing 1-10 of 23 results. Next

A091840 Lengths of suffix blocks associated with A091787.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 32, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 32, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 119, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 10 2004

Keywords

Crossrefs

A357063 Lengths of the B blocks associated with A091787.

Original entry on oeis.org

1, 4, 13, 42, 127, 382, 1149, 3448, 10345, 31044, 93133, 279400, 838203, 2514610, 7543831, 22631496, 67894489, 203683468, 611050413, 1833151240, 5499453721, 16498361166, 49495083499, 148485250498, 445455751497, 1336367254492, 4009101763477, 12027305290463, 36081915871390, 108245747614173, 324737242842520, 974211728527561, 2922635185582686, 8767905556748059, 26303716670244178, 78911150010732543, 236733450032197630, 710200350096592891
Offset: 1

Views

Author

Levi van de Pol, Sep 10 2022

Keywords

Comments

The B blocks are explained in the article "A slow-growing sequence defined by an unusual occurrence". They have superscript (2).

Examples

			The third B-block of order 2 is B_3^{(2)}=2223222322233. Therefore, a(3)=13.
		

Crossrefs

Programs

  • Python
    number_of_terms=38
    def Cn(X):
        l=len(X)
        cn=1
        for i in range(1,int(l/2)+1):
            j=i
            while(X[l-j-1]==X[l-j-1+i]):
                j=j+1
                if j>=l:
                    break
            candidate=int(j/i)
            if candidate>cn:
                cn=candidate
        return cn
    # This algorithm generates a prefix of the level-3 Gijswijt sequence
    def Generate_A3(number):
      glue_lengths=[]
      A3=[3]
      S=[3]
      i=0
      while(True):
          c=Cn(A3)
          if c<3:
            glue_lengths.append(len(S))
            i=i+1
            if i==number:
                break
            S=[]
          A3.append(max(c,3))
          S.append(max(c,3))
      return glue_lengths
    glue_lengths=Generate_A3(number_of_terms-1)
    beta_lengths=[1]
    beta_length=1
    for l in glue_lengths:
        beta_length=3*beta_length+l
        beta_lengths.append(beta_length)
    print(beta_lengths)

Extensions

By special permission, more than the usual number of terms are shown. - N. J. A. Sloane, Oct 23 2022

A093956 A091787(n) - 2.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, May 22 2004

Keywords

Comments

The purpose of A093955-A093958 is to compare A090822, A091787, A091799 and A091844 on the same "scale".
Sequence is unbounded.

Crossrefs

A091579 Lengths of suffix blocks associated with A090822.

Original entry on oeis.org

1, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 67, 1, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 196, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 68, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 581, 3, 1, 9, 4, 25, 3, 1, 9, 4, 67, 1, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 196, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 68, 3, 1, 9, 4, 24, 1, 3, 1, 9, 4, 1731, 3, 1, 9, 4, 24
Offset: 1

Views

Author

N. J. A. Sloane, Mar 05 2004

Keywords

Comments

The suffix blocks are what is called "glue string" in the paper by Gijswijt et al (2007). Roughly speaking, these are the terms >= 2 appended before the sequence (A090822) goes on with a(n+1) = 1 followed by all other initial terms a(2..n), cf. Example. The concatenation of these glue strings yields A091787. - M. F. Hasler, Aug 08 2018

Examples

			From _M. F. Hasler_, Aug 09 2018: (Start)
In sequence A090822, after the initial (1, 1) follows the first suffix block or glue string (2) of length a(1) = 1. This is followed by A090822(4) = 1 which indicates that the suffix block has ended, and the whole sequence A090822(1..3) up to and including this suffix block is repeated: A090822(4..6) = A090822(1..3).
Then A090822 goes on with (2, 2, 3, 1, ...), which tells that the second suffix block is A090822(7..9) = (2, 2, 3) of length a(2) = 3, whereafter the sequence starts over again: A090822(10..18) = A090822(1..9). (End)
		

Crossrefs

Cf. A090822, A091587 (records). For a smoothed version see A091839.
Cf. A091787 for the concatenation of the glue strings.

Programs

  • Python
    # compute curling number of L
    def curl(L):
        n = len(L)
        m = 1 #max nr. of repetitions at the end
        k = 1 #length of repeating block
        while(k*(m+1) <= n):
            good = True
            i = 1
            while(i <= k and good):
                for t in range(1, m+1):
                    if L[-i-t*k] != L[-i]:
                        good = False
                i = i+1
            if good:
                m = m+1
            else:
                k = k+1
        return m
    # compute lengths of first n glue strings
    def A091579_list(n):
        Promote = [1] #Keep track of promoted elements
        L = [2]
        while len(Promote) <= n:
            c = curl(L)
            if c < 2:
                Promote = Promote+[len(L)+1]
                c = 2
            L = L+[c]
        return [Promote[i+1]-Promote[i] for i in range(n)]
    # Dion Gijswijt, Oct 08 2015

A091799 a(1) = 3. 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,3).

Original entry on oeis.org

3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3
Offset: 1

Views

Author

N. J. A. Sloane, Mar 08 2004

Keywords

Comments

Here xy^k means the concatenation of the words x and k copies of y.
The first '5' appears at step 343. At which step does the first '6' appear? - Sergio Pimentel, Jul 13 2015
The first '6' appears at about 4.33*10^616, see FORMULA for exact value. The positions where record lengths of strings 5 and 6 occur can be computed via sequence A091844, see PARI code there. - M. F. Hasler, Sep 29 2018
This sequence is the concatenation of the "glue strings" of sequence A091787, just like sequence A091844 is the concatenation of the glue strings of this sequence. - M. F. Hasler, Oct 04 2018

Crossrefs

Programs

  • Mathematica
    maxBlockLength = 21; a[1] = 3; 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]], 3]]; Array[a, 99] (* Jean-François Alcover, Nov 07 2013 *)
  • PARI
    A091799(n,A=[])={while(#Ak||break; k=m);A=concat(A,k));A} \\ M. F. Hasler, Aug 07 2018

Formula

From M. F. Hasler, Sep 29 2018: (Start)
The first '5' appears at position 343 which in hexadecimal is 1x, with x = 57 (in base 16).
The first two consecutive '5's appear at positions 5760309085..5760309086, which is {-1..0} + 1y in hexadecimal, where y = xxxx + 7.
Then '55' occurs again at positions {-1..0} + 1yy in hexadecimal, etc.
The first three consecutive '5's appear at positions 1z + {-2..0} in hexadecimal, where z = yyyy + 20 (in base 16).
Then '555' occurs again at positions {-2..0} + 1zz in hexadecimal, etc.
The first occurrence of '5555' is at positions {-4..-1} + 1w in hexadecimal, where w = zzzz + 98 (in base 16).
'555' also occurs again at positions {-2..0} + 1w'z in hexadecimal, where 'z = 'yyyy + 20, 'y = 'xxxx + 7 and 'x = x - 1 = 56 (in base 16), and also at positions {-2..0} + 1w'zz in hexadecimal, and at positions {-2..0} + 1w'zzz in hexadecimal.
Then '5555' occurs again at positions {-4..-1} + 1w'w in hexadecimal, where 'w = 'zzzz + 98 (in base 16).
'555' also occurs again at positions {-2..0} + 1w'w'z in hexadecimal, etc.
'5555' also occurs again at positions {-3..0} + 1w'w'w in hexadecimal, and at positions {-4..-1} + 1w'w'w'w in hexadecimal.
The first occurrence of a '6' (immediately after the first '55555', followed by a sixth '5') is at position 1w'w'w'w + 30E in hexadecimal, which equals 782 + 16^510*257 + (16^512-1)/(16^128-1)*(158 - 16^126 + (16^128-1)/(16^32-1)*(32 + (16^32-1)/(16^8-1)*(7 + (16^8-1)/255*87))). (End)

A094004 a(n) = (conjectured) length of longest string that can be generated by a starting string of 2's and 3's of length n, using the rule described in the Comments lines.

Original entry on oeis.org

1, 4, 5, 8, 9, 14, 15, 66, 68, 70, 123, 124, 125, 132, 133, 134, 135, 136, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 200, 201, 202, 203, 204, 205, 206, 207, 209, 250, 251, 252, 253
Offset: 1

Views

Author

N. J. A. Sloane, May 31 2004. Revised by N. J. A. Sloane, Sep 17 2012

Keywords

Comments

Start with an initial string of n numbers s(1), ..., s(n), all = 2 or 3. The rule for extending the string is this:
To get s(i+1), write the string s(1)s(2)...s(i) 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 (k is the "curling number" of the string). Then set s(i+1) = k if k >=2, but if k=1 you must stop (without writing down the 1).
The "Curling Number Conjecture" is that if one starts with any finite string and repeatedly extends it by appending the curling number k, then eventually one must reach a 1. This has not yet been proved.
The values shown for n >= 49 are only conjectures, because certain assumptions used to cut down the search have not yet been rigorously justified. However, we believe that ALL terms shown are correct. - N. J. A. Sloane, Sep 17 2012

Examples

			a(3) = 5, using the starting string 3,2,2, which extends to 3,2,2,2,3, of length 5.
a(4) = 8, using the starting string 2,3,2,3, which extends to 2,3,2,3,2,2,2,3 of length 8.
a(8) = 66: start = 23222323, end = 232223232223222322322232223232223222322322232223232223222322322332.
a(22) = 142: start = 2322322323222323223223: see A116909 for trajectory.
		

Crossrefs

Extensions

a(27)-a(30) from Allan Wilks, Jul 29 2004
a(31)-a(36) from Benjamin Chaffin, Apr 09 2008
a(37)-a(44) (computed in 2008) from Benjamin Chaffin, Dec 04 2009
a(45)-a(48) from Benjamin Chaffin, Dec 18 2009
a(49)-a(50) from Benjamin Chaffin, Dec 26 2009
a(51)-a(52) from Benjamin Chaffin, Jan 10 2010
a(53)-a(80) from Benjamin Chaffin, Jan 10 2012

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).

Original entry on oeis.org

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
Offset: 1

Views

Author

N. J. A. Sloane, Mar 10 2004

Keywords

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

Crossrefs

Programs

  • 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 *)
  • 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(#AA091799. - M. F. Hasler, Sep 30 2018

A093955 A090822(n) - 1.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, May 22 2004

Keywords

Comments

The purpose of A093955-A093958 is to compare A090822, A091787, A091799 and A091844 on the same "scale".
Sequence is unbounded. A 3 appears for the first time at n=220. A 4 appears for the first time at around n = 10^10^23.

Crossrefs

A093958 A091844(n) - 4.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

N. J. A. Sloane, May 22 2004

Keywords

Comments

The purpose of A093955-A093958 is to compare A090822, A091787, A091799 and A091844 on the same "scale".
Sequence is unbounded.

Crossrefs

A091409 a(n) is the smallest m such that A090822(m) = n.

Original entry on oeis.org

1, 3, 9, 220
Offset: 1

Views

Author

N. J. A. Sloane, based on a suggestion from Dion Gijswijt (gijswijt(AT)science.uva.nl), Mar 04 2004

Keywords

Crossrefs

Cf. A090822.

Formula

a(n) is about 2^(2^(3^(4^(5^...^(n-1))))).

Extensions

Sequence is infinite but next term, about 10^(10^23.09987) (see A091787), is too large to include.
Showing 1-10 of 23 results. Next