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 15 results. Next

A091839 A smoothed version of A091579.

Original entry on oeis.org

1, 3, 1, 8, 1, 3, 1, 24, 1, 3, 1, 8, 1, 3, 1, 67, 1, 3, 1, 8, 1, 3, 1, 24, 1, 3, 1, 8, 1, 3, 1, 195, 1, 3, 1, 8, 1, 3, 1, 24, 1, 3, 1, 8, 1, 3, 1, 67, 1, 3, 1, 8, 1, 3, 1, 24, 1, 3, 1, 8, 1, 3, 1, 580, 1, 3, 1, 8, 1, 3, 1, 24, 1, 3, 1, 8, 1, 3, 1, 67, 1, 3, 1, 8, 1, 3, 1, 24, 1, 3, 1, 8, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 10 2004

Keywords

Comments

Obtained from A091579 by the following transformation: replace 4 by 3, 1; replace 9 by 8, 1; 25 by 24, 1; 68 by 67, 1; 196 by 195, 1; 581 by 580, 1; 1731 by 1730, 1; 15534 by 15533, 1, etc.

Formula

New records (see A091588) first appear at powers of 2. Also a(2n+1) = 1; a(4n+2) = 3; a(8n+4) = 8; etc.

Extensions

Removed an incorrect program. - N. J. A. Sloane, Aug 20 2022

A091587 Records in A091579.

Original entry on oeis.org

1, 3, 9, 24, 67, 196, 581, 1731, 5180, 15534, 46578, 139713, 419116
Offset: 0

Views

Author

N. J. A. Sloane, Mar 05 2004

Keywords

Comments

Each term is roughly 3 times the previous term.

Crossrefs

Cf. A090822, A091579. A091588 is a smoothed version.

Extensions

a(10)-a(12) from John P. Linderman, May 30 2004

A217590 Values in A091579 that need to be smoothed in order to produce A091588.

Original entry on oeis.org

4, 9, 25, 68, 196, 581, 1731, 5180, 15534, 46579, 139713, 419116, 1257320
Offset: 1

Views

Author

N. J. A. Sloane, Mar 18 2013

Keywords

Comments

a(n) = A091588(n) + 1 for n >= 1.
Each term is roughly 3 times the previous term.

Crossrefs

Formula

I would very much like a formula for this sequence!

A357065 Numbers k with the following property: the value A091839(k+1) is not a 1 that is obtained from smoothing A091579.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 37, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 53, 55, 56, 57, 58, 59, 61, 63, 65, 66, 67, 69, 71, 73, 74, 75, 77, 79, 80, 81, 82, 83, 85, 87, 88, 89, 90, 91, 93, 95, 97, 98, 99, 101, 103
Offset: 1

Views

Author

Levi van de Pol, Sep 10 2022

Keywords

Comments

This sequence is the function iota1 in the article "The first occurrence of a number in Gijswijt's sequence" (page 21). For the connection with smoothing, see Subsection 8.1.

Examples

			14 is not a term since A091839(14+1) is a 1 obtained from smoothing: in A091579, the eleventh value is 4, which is replaced by 3,1 to obtain the fourteenth and fifteenth terms of A091839.
		

Crossrefs

A092432 Partial sums of A091579.

Original entry on oeis.org

1, 4, 5, 14, 18, 42, 43, 46, 47, 56, 60, 127, 128, 131, 132, 141, 145, 169, 170, 173, 174, 183, 187, 383, 386, 387, 396, 400, 424, 425, 428, 429, 438, 442, 510, 513, 514, 523, 527, 551, 552, 555, 556, 565, 569, 1150, 1153, 1154, 1163, 1167, 1192, 1195, 1196, 1205, 1209
Offset: 1

Views

Author

N. J. A. Sloane, Mar 24 2004

Keywords

A090822 Gijswijt's sequence: a(1) = 1; for n>1, a(n) = largest integer k such that the word a(1)a(2)...a(n-1) 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.

Original entry on oeis.org

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

Views

Author

Dion Gijswijt, Feb 27 2004

Keywords

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 = n-1 - 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, the first time N appears is at about position 2^(2^(3^(4^(5^...^(N-1))))). - N. J. A. Sloane and Allan Wilks, Mar 14 2004
For a similar formula, see p. 6 of Levi van de Pol article. - Levi van de Pol, Feb 06 2023
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 base-dependent sequence.
Does this sequence have a finite average? Does anyone know the exact value? - Franklin T. Adams-Watters, 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
Second answer: The asymptotic densities of the numbers exist, and the average is the dot product. See pp. 56-59 of Levi van de Pol article. - Levi van de Pol, Feb 06 2023
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
Answer: The first x such that the x-th and (x+1)-th element are 4, is 255895648634818208370064452304769558261700170817472823... ...398081655524438021806620809813295008281436789493636144. See p. 55 of Levi van de Pol article. - Levi van de Pol, Feb 06 2023

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. 93-110.

Crossrefs

A091412 gives lengths of runs. A091413 gives partial sums.
Generalizations: A094781, A091975, A091976, A092331-A092335.

Programs

  • Haskell
    -- See link.
    
  • 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 .. -(i-1)*k-1] = b do od:
      m:= max(m, i-1);
    od:
    end proc:
    A[1]:= 1:
    for i from 2 to 220 do
      A[i]:= K([seq(A[j],j=1..i-1)])
    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[n-1, 2]}] // Sort // Last // First; PrependTo[ reversed, an]; an]; A090822 = Table[a[n], {n, 1, 99}] (* Jean-François Alcover, Aug 13 2012 *)
  • PARI
    A090822(n,A=[])={while(#Ak||break; k=m);A=concat(A,k));A} \\ M. F. Hasler, Aug 08 2018
    
  • Python
    def k(s):
        maxk = 1
        for m in range(1, len(s)+1):
            i, y, kk = 1, s[-m:], len(s)//m
            if kk <= maxk: return maxk
            while s[-(i+1)*m:-i*m] == y: i += 1
            maxk = max(maxk, i)
    def aupton(terms):
        alst = [1]
        for n in range(2, terms+1):
            alst.append(k(alst))
        return alst
    print(aupton(99)) # Michael S. Branicky, Mar 28 2022

A091787 a(1) = 2. 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,2).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 07 2004

Keywords

Comments

Here xy^k means the concatenation of the words x and k copies of y.
a(77709404388415370160829246932345692180) = 5 is the first time 5 appears.
This is also the concatenation of the glue strings of A090822, whose respective lengths are given in A091579. - M. F. Hasler, Oct 04 2018
This sequence is called the level-2 Gijswijt sequence.

Examples

			To get a(2): a(1) = 2 = (2)^1, so k = 1, a(2) = 2.
To get a(3): a(1)a(2) = 22 = (2)^2, so a(3) = k = 2.
To get a(4): a(1)a(2)a(3) = 222 = (2)^3, so a(3) = k = 3.
		

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. 93-110.

Crossrefs

Programs

  • PARI
    A091787(n, A=[])={while(#Ak||break; k=m); A=concat(A, k)); A} \\ M. F. Hasler, Oct 04 2018
    
  • Python
    from itertools import islice
    def c(w):
        for k in range(len(w), 0, -1):
            for l in range(1, len(w)//k + 1):
                if w[-k*l:] == w[-l:]*k: return k
    def agen(): # generator of terms
        alst, an = [], 2
        while True: yield an; alst.append(an); an = max(2, c(alst))
    print(list(islice(agen(), 99))) # Michael S. Branicky, Sep 10 2022

A091411 Lengths of the B blocks in analysis of A090822.

Original entry on oeis.org

1, 3, 9, 19, 47, 98, 220, 441, 885, 1771, 3551, 7106, 14279, 28559, 57121, 114243, 228495, 456994, 914012, 1828025, 3656053, 7312107, 14624223, 29248450, 58497096, 116994195, 233988391, 467976791, 935953586, 1871907196
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2004

Keywords

Comments

Also, values of len_y(n) when len_x(n) = 0 in A090822.

Crossrefs

Formula

a(1) = 1; for n > 1, a(n+1) = 2*a(n) + A091579(n).
This roughly doubles at each step and a(n) -> 1.743349432191828... * 2^n.

Extensions

14279 and 28559 from Allan Wilks, Mar 04 2004
Extended by N. J. A. Sloane, Mar 06 2004

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

A157107 Indices of 4's in A090822.

Original entry on oeis.org

220, 440, 661, 881, 1105, 1325, 1546, 1766, 1991, 2211, 2432, 2652, 2876, 3096, 3317, 3537, 3771, 3991, 4212, 4432, 4656, 4876, 5097, 5317, 5542, 5762, 5983, 6203, 6427, 6647, 6868, 7088, 7326, 7546, 7767, 7987, 8211, 8431, 8652, 8872, 9097, 9317, 9538
Offset: 1

Views

Author

Paul Curtz, Feb 23 2009

Keywords

Comments

Despite appearances, this is a highly irregular sequence. - N. J. A. Sloane
The first pair of consecutive 4's occurs at position 255895648634818208370064452304769558261700170817472823398081\
655524438021806620809813295008281436789493636145 [Gijswijt, 2016, page 12]. - Sergio Pimentel, Feb 21 2017
Comment from N. J. A. Sloane, Feb 28 2017: (Start)
Page 12 of Gijswijt (2016) states:
"In dat stuk vinden we 355 promoties en daarmee 355 stukken lijm van lengte 1, 3, 1, 9, 4, 24, 1, 3, ... Na 355 keer verdubbelen en lijm toevoegen vinden we uiteindelijk de eerste dubbele vier in A090822, en wel op positie
255.895.648.634.818.208.370.064.452.304.769.558.
261.700.170.817.472.823.398.081.655.524.438.021.
806.620.809.813.295.008.281.436.789.493.636.145".
A rough translation might be:
"... we find 355 promotions and thus 355 glue segments of lengths 1, 3, 1, 9, 4, 24, 1, 3, ...
We eventually find the first pair of consecutive 4's in A090822 at position
255,895,648,634,818,208,370,064,452,304,769,558,
261,700,170,817,472,823,398,081,655,524,438,021,
806,620,809,813,295,008,281,436,789,493,636,145."
Dion Gijswijt, Mar 01 2017 adds that the number mentioned is the position of the second 4 in the first occurrence of 4,4 in A090822. For the glue segments see A091579.
(End)

Crossrefs

Extensions

Edited by N. J. A. Sloane, Feb 24 2009
More terms from R. J. Mathar, Feb 24 2009
Showing 1-10 of 15 results. Next