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-7 of 7 results.

A357067 Decimal expansion of the limit of A091411(k)/2^(k-1) as k goes to infinity.

Original entry on oeis.org

3, 4, 8, 6, 6, 9, 8, 8, 6, 4, 3, 8, 3, 6, 5, 5, 9, 7, 0, 2, 3, 5, 8, 7, 2, 7, 0, 0, 7, 0, 2, 2, 2, 0, 6, 6, 7, 3, 3, 5, 4, 1, 3, 6, 6, 2
Offset: 1

Views

Author

Levi van de Pol, Oct 22 2022

Keywords

Comments

In the article "The first occurrence of a number in Gijswijt's sequence", this constant is called epsilon_1. Its existence is proved in Theorem 7.2. The constant occurs in a direct formula (Theorem 7.11) for A091409(n), the first occurrence of the integer n in Gijswijt's sequence A090822.

Examples

			3.48669886438365597023...
		

Crossrefs

Programs

  • Python
    import math
    from mpmath import *
    # warning: 0.1 and mpf(1/10) are incorrect. Use mpf(1)/mpf(10)
    mp.dps=60
    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
    def epsilon():
        A=[2] # level-2 Gijswijt sequence
        number=1 # number of S strings encountered
        position=0 # position of end of last S
        value=mpf(1) # approximation for epsilon1
        for i in range(1,6000):
            k=Cn(A)
            A.append(max(2,k))
            if k<2:
                value=value+mpf(i-position)/mpf(2**number)
                position=mpf(i)
                number+=1
        return value
    print("epsilon_1: ",epsilon())

Formula

Equal to 1 + Sum_{k>=1} A091579(k)/2^k. Proved in Corollary 7.3 of the article "The first occurrence of a number in Gijswijt's sequence".

A157140 A091411(k+3) replicated 2^k times, k= 0, 1, 2, 3, ...

Original entry on oeis.org

9, 19, 19, 47, 47, 47, 47, 98, 98, 98, 98, 98, 98, 98, 98, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441
Offset: 0

Views

Author

Paul Curtz, Feb 24 2009

Keywords

Comments

Generated from the quadrisection b(n) = 4, 13, 23, 32, 51, 60, 70, 79, 102, 111, 121, 130,... of A156799 as follows:
1) b(n+1)-b(n) = 9, 10, 9, 19, 9, 10, 9, 23, 9, 10, 9, 19,..,
2) b(n+2)-b(n) = 19, 19, 28, 28, 19, 19, 32, 32, 19, 19, 28, 28,...,
3) b(n+4)-b(n) = 47, 47, 47, 47, 51, 51, 51, 51, 47, 47, 47, 47,...,
4) b(n+8)-b(n) = 98, 98, 98, 98, 98, 98, 98, 98, 122, 122, 122, 122, 122, 122, 122, 122, 98, .. .
The sum of neighbors at the first jump of b(n+2^k) is 9+10 = 19 (k=0), 19+28 = 47 (k=1), 47+51 = 98 (k=2), 98+122 = 220 (k=3), and in general A091411(k+3).

A157217 Mix A091411 and its differences.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 19, 28, 47, 51, 98, 122, 220, 221, 441, 444, 885, 886, 1771, 1780, 3551, 3555, 7106, 7173, 14279, 14280, 28559, 28562, 57121, 57122, 114243, 114252, 228495, 228499, 456994, 457018, 914012, 914013, 1828025, 1828028, 3656053, 3656054, 7312107, 7312116
Offset: 0

Views

Author

Paul Curtz, Feb 25 2009

Keywords

Comments

First differences: 1, 1, 3, 3, 1, 9, 9, 19, 4, 47, ....

Formula

a(2n) = A091441(n+1). a(2n-1) = A091441(n+1)-A091441(n).

A357064 a(n) = k such that A091411(k) = A091409(n).

Original entry on oeis.org

1, 2, 3, 7, 418090195952691922788354
Offset: 1

Views

Author

Levi van de Pol, Sep 10 2022

Keywords

Comments

The existence of a(n) is proven in Lemma 1.2(a) of the article "The first occurrence of a number in Gijswijt's sequence". There, it is called t^{(1)}(n). In this article, a formula for the numbers t^{(m)}(n) is given. It looks like a tower of exponents and can be found in Theorem 6.20. This formula is then used to find a formula for the first occurrence of an integer n in Gijswijt's sequence, which is A091409(n).
The value of a(5) is calculated in Subsection 8.2 of the same article.
The value of a(6) is larger than 10^(10^100), so it would be impossible to include here.

Examples

			For n=4 we have A091411(7)=A091409(4). Therefore, a(4)=7.
		

Crossrefs

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

A091410 Values of n such that len_x(n) = 0 in A090822.

Original entry on oeis.org

1, 2, 3, 7, 19, 39, 95, 197, 441, 883, 1771, 3543, 7103, 14213, 28559, 57119
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2004

Keywords

Comments

So far this very nearly doubles at each step.

Crossrefs

Extensions

28559 and 57119 from Allan Wilks, Mar 04 2004

A095828 Smoothed lengths of the B blocks in analysis of A090822.

Original entry on oeis.org

1, 3, 9, 19, 46, 93, 189, 379, 782, 1565, 3133, 6267, 12542, 25085, 50173, 100347, 200761, 401523, 803049, 1606099, 3212206, 6424413, 12848829, 25697659, 51395342, 102790685, 205581373, 411162747, 822325502, 1644651005, 3289302013, 6578604027, 13157208249
Offset: 1

Views

Author

N. J. A. Sloane, Jul 10 2004

Keywords

Crossrefs

Formula

a(1) = 1; for n > 1, a(n+1) = 2*a(n) + A091839(n).
This roughly doubles at each step and a(n) -> 1.5317006328915480... * 2^n.
Showing 1-7 of 7 results.