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

A296564 Decimal expansion of lim_{k->infinity} (1/k)*Sum_{i=1..k} A293630(i).

Original entry on oeis.org

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

Views

Author

Iain Fox, Dec 15 2017

Keywords

Comments

From Jon E. Schoenfield, Dec 23 2017: (Start)
Starting with the sequence S_0 = {1,2} and extending it one pass at a time as described at A293630 (obtaining S_1 = {1,2,1,1}, S_2 = {1,2,1,1,1,2,1}, etc.), let n_j be the number of terms in S_j; then for j=0,1,2,..., n_j = 2, 4, 7, 13, 37, 73, 145, 289, 865, 1729, 3457, 10369, 20737, 41473, 82945, 248833, 497665, ... (see A291481).
In the algorithm implemented in the PARI program, the variable "build" specifies the number of passes during which the terms of S_j are actually built and stored. The algorithm then uses the terms of S_build to compute the number (n_j) of terms in S_j and their total value (t_j) for each j in build+1..build+n_build. For build=0,1,2,..., the number of decimal digits to which the final ratio t_j/n_j at j = build + n_build matches the actual limit 1.275261842... is 2, 3, 4, 7, 15, 29, 54, 105, 306, 608, 1213, 3629, 7253, 14501, 28995, 86974, 173941, ...
Thus, for example, using build=7, the number of 1s and 2s in the last sequence actually stored, i.e., S_7, is 289, but the number of terms n_j and their total value t_j are computed for every j up through j = build+n_build = 7 + n_7 = 7 + 289 = 296 (both n_296 and t_296 are 104-digit numbers) and the final ratio t_296/n_296 matches the actual limit to 105 decimal digits. (End)
From Iain Fox, Dec 23 2017: (Start)
This is the average value of A293630 on the interval n = 1..infinity.
Is this number transcendental? (End)

Examples

			Equals 1.2752618420911721359284772047801515149347600371...
After generating k steps of A293630:
  k = 0:        [1, 2];                  1.500000000000...
  k = 1:        [1, 2, 1, 1];            1.250000000000...
  k = 2:        [1, 2, 1, 1, 1, 2, 1];   1.285714285714...
  k = 3:        [1, 2, 1, 1, 1, 2, ...]; 1.307692307692...
  k = 4:        [1, 2, 1, 1, 1, 2, ...]; 1.270270270270...
  k = 5:        [1, 2, 1, 1, 1, 2, ...]; 1.273972602739...
  k = 6:        [1, 2, 1, 1, 1, 2, ...]; 1.275862068965...
  ...
  k = infinity: [1, 2, 1, 1, 1, 2, ...]; 1.275261842091...
		

Crossrefs

Cf. A293630.

Programs

  • PARI
    gen(build) = {
    my(S = [1, 2], n = 2, t = 3, L, nPrev, E);
    print(S);
    print(1.0*t/n);
    for(j = 1, build, L = S[#S]; n = n*(1+L)-L; t = t*(1+L)-L^2; nPrev = #S; for(r = 1, L, for(i = 1, nPrev-1, S = concat(S, S[i]))); print(S); print(1.0*t/n));
    E = S;
    for(j = build + 1, build + #E, L = E[#E+1-(j-build)]; n = n*(1+L)-L; t = t*(1+L)-L^2; print(1.0*t/n));
    } \\ (gradually increase build to get more precise answers) Iain Fox, Dec 23 2017 with help of Jon E. Schoenfield

A291481 Number of terms of A293630 at stage n.

Original entry on oeis.org

2, 4, 7, 13, 37, 73, 145, 289, 865, 1729, 3457, 10369, 20737, 41473, 82945, 248833, 497665, 995329, 1990657, 3981313, 11943937, 23887873, 47775745, 143327233, 286654465, 573308929, 1146617857, 3439853569, 6879707137, 20639121409, 41278242817, 82556485633
Offset: 0

Views

Author

Benoit Cloitre, Oct 15 2017

Keywords

Comments

limsup a(n+1)/a(n) = 3, liminf a(n+1)/a(n) = 2 (n->oo). It seems that lim_{n->oo} a(n)^(1/n) = C with C > 2.
Limit_{n->oo} a(n)^(1/n) = 2.236151... (see A297890). - Jon E. Schoenfield, Dec 23 2017
The previous limit is also equal to 2^(2 - d) * 3^(d - 1), where d = 1.275261... (see A296564). - Iain Fox, Dec 24 2017

Examples

			A293630 at stage n:
  n = 0: [1, 2];                                      2 terms
  n = 1: [1, 2, 1, 1];                                4 terms
  n = 2: [1, 2, 1, 1, 1, 2, 1];                       7 terms
  n = 3: [1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2];    13 terms
  n = 4: [1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, ...];  37 terms
   ...
		

Crossrefs

Programs

  • Mathematica
    Length /@ NestList[Join[#, Join @@ ConstantArray[Most[#], Last[#]]] &, {1, 2}, 24] (* Michael De Vlieger, Jan 21 2018 *)
  • PARI
    v=[1,2];for(n=1,17,l=length(v);w=vector(l-1,i,v[i]);v=concat(v,if(v[l]-1,concat(w,w),w));print1(length(v),","));
    
  • PARI
    lista(nn) = {
    my(S = [1, 2], n = 2, L, nPrev, E);
    print1("2, ");
    for(j = 1, nn, L = S[#S]; n = n*(1+L)-L; nPrev = #S; for(r = 1, L, for(i = 1, nPrev-1, S = concat(S, S[i]))); print1(n, ", "));
    E = S;
    for(j = nn + 1, nn + #E, L = E[#E+1-(j-nn)]; n = n*(1+L)-L; print1(n, ", "))
    } \\ Iain Fox, Jan 21 2018
    
  • Python
    a, z = [1, 2], [2]
    while z[-1]<1000:
        a += a[:-1]*a[-1]
        z.append(len(a))
    for i in range(100):
        z.append((z[-1]-1)*(a.pop()+1)+1)
    print(z)
    # Andrey Zabolotskiy, Oct 15 2017

Formula

From Iain Fox, Jan 21 2018: (Start)
a(n) = (1 + A293630(a(n-1)))*a(n-1) - A293630(a(n-1)).
a(n) ~ c^n, where c = 2.236151... (see comments or A297890).
(End)

Extensions

More terms from Andrey Zabolotskiy, Oct 15 2017

A322423 Start with (1, 2, 3); when the sequence has n terms, extend it by appending a(n) copies of a(1..n-1). (Cf. "Look to the left" sequence A293630.)

Original entry on oeis.org

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

Views

Author

Iain Fox, Dec 07 2018

Keywords

Examples

			Sequence starts with 1, 2, 3.  Then 3 copies of 1, 2 are appended, giving 1, 2, 3, 1, 2, 1, 2, 1, 2.  Then 2 copies of everything but the final entry 2 are appended, giving 9 + 8 + 8 + 8 = 33 terms.
		

Crossrefs

"Look to the left" sequences: A293630 (seed 1,2), A322424 (seed 1,2,3,4), A322425 (seed 1,2,3,4,5).
Cf. A322426.

Programs

  • Mathematica
    Nest[Join[#, Flatten@ ConstantArray[Drop[#, -1], #[[-1]]] ] &, {1, 2, 3}, 4] (* Michael De Vlieger, Dec 08 2018 *)
  • PARI
    gen(n, v=[1,2,3], w) = for(x=1, n, w=vector(#v-1, i, v[i]); for(y=1, v[#v], v=concat(v, w))); v

Formula

Lim_{n->infinity} (a(1) + a(2) + ... + a(n))/n = 1.64948851...

Extensions

Self-contained definition from M. F. Hasler, Dec 10 2018

A322424 Start with (1, 2, 3, 4); when the sequence has n terms, extend it by appending a(n) copies of a(1..n-1). (Cf. "Look to the left" sequence A293630.)

Original entry on oeis.org

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

Views

Author

Iain Fox, Dec 07 2018

Keywords

Examples

			Sequence starts with 1, 2, 3, 4.  Then 4 copies of 1, 2, 3 are appended, giving 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3.  Then 3 copies of everything but the final entry 3 are appended, giving 16 + 15 + 15 + 15 = 61 terms.
		

Crossrefs

"Look to the left" sequences: A293630 (seed 1,2), A322423 (seed 1,2,3), A322425 (seed 1,2,3,4,5).
Cf. A322426.

Programs

  • Mathematica
    Nest[Join[#, Flatten@ ConstantArray[Drop[#, -1], #[[-1]]] ] &, Range@ 4, 3] (* Michael De Vlieger, Dec 08 2018 *)
  • PARI
    gen(n, v=[1,2,3,4], w) = for(x=1, n, w=vector(#v-1, i, v[i]); for(y=1, v[#v], v=concat(v, w))); v

Formula

Lim_{n->infinity} (a(1) + a(2) + ... + a(n))/n = 2.08405776...

Extensions

Self-contained definition from M. F. Hasler, Dec 10 2018

A322425 Start with (1, 2, 3, 4, 5); if the sequence has n terms, extend it by appending a(n) copies of a(1..n-1): cf. "Look to the left" sequence A293630.

Original entry on oeis.org

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

Views

Author

Iain Fox, Dec 07 2018

Keywords

Crossrefs

"Look to the left" sequences: A293630 (seed 1,2), A322423 (seed 1,2,3), A322424 (seed 1,2,3,4).
Cf. A322426.

Programs

  • Mathematica
    Nest[Join[#, Flatten@ ConstantArray[Drop[#, -1], #[[-1]]] ] &, Range@ 5, 2] (* Michael De Vlieger, Dec 08 2018 *)
  • PARI
    gen(n, v=[1, 2, 3, 4, 5], w) = for(x=1, n, w=vector(#v-1, i, v[i]); for(y=1, v[#v], v=concat(v, w))); v

Formula

Lim_{n->infinity} (a(1) + a(2) + ... + a(n))/n = 2.55182072...

Extensions

Self-contained definition from M. F. Hasler, Dec 10 2018

A322426 Array read by downwards antidiagonals: A(n, k) is the k-th term of a "Look to the left" sequence starting with 1,2,...,n (see A293630).

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 3, 2, 1, 2, 2, 4, 3, 2, 1, 1, 1, 1, 4, 3, 2, 1, 1, 2, 2, 5, 4, 3, 2, 1, 2, 1, 3, 1, 5, 4, 3, 2, 1, 1, 2, 1, 2, 6, 5, 4, 3, 2, 1, 1, 1, 2, 3, 1, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 2, 7, 6, 5, 4, 3, 2, 1, 2, 3, 1, 1, 3, 1, 7, 6, 5
Offset: 2

Views

Author

Iain Fox, Dec 07 2018

Keywords

Examples

			| n\k |  1   2   3   4   5   6   7   8   9  10  11  12  13  ...
|-----|-----------------------------------------------------------
|  2  |  1,  2,  1,  1,  1,  2,  1,  1,  2,  1,  1,  1,  2, ...
|  3  |  1,  2,  3,  1,  2,  1,  2,  1,  2,  1,  2,  3,  1, ...
|  4  |  1,  2,  3,  4,  1,  2,  3,  1,  2,  3,  1,  2,  3, ...
|  5  |  1,  2,  3,  4,  5,  1,  2,  3,  4,  1,  2,  3,  4, ...
|  6  |  1,  2,  3,  4,  5,  6,  1,  2,  3,  4,  5,  1,  2, ...
|  7  |  1,  2,  3,  4,  5,  6,  7,  1,  2,  3,  4,  5,  6, ...
|  8  |  1,  2,  3,  4,  5,  6,  7,  8,  1,  2,  3,  4,  5, ...
| ... |
		

Crossrefs

n-th row: A293630 (n=2), A322423 (n=3), A322424 (n=4), A322425 (n=5).

Programs

  • PARI
    row(n, k) = my(v=vector(n, i, i), w); while(#v
    				

Formula

If k <= n, A(n, k) = k.

A297927 Decimal expansion of ratio of number of 1's to number of 2's in A293630.

Original entry on oeis.org

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

Views

Author

Iain Fox, Jan 08 2018

Keywords

Comments

Equals (2 - d)/(d - 1), where d = lim_{k->infinity} (1/k)*Sum_{i=1..k} A293630(i) = 1.275261... (see A296564).
See comments from Jon E. Schoenfield on A296564 for explanation of PARI program.
Is this number transcendental?

Examples

			Equals 2.6329045551790659457987285567535974571155706290...
After generating k steps of A293630:
  k = 0:        [1, 2];                  1
  k = 1:        [1, 2, 1, 1];            3
  k = 2:        [1, 2, 1, 1, 1, 2, 1];   2.5
  k = 3:        [1, 2, 1, 1, 1, 2, ...]; 2.25
  k = 4:        [1, 2, 1, 1, 1, 2, ...]; 2.7
  k = 5:        [1, 2, 1, 1, 1, 2, ...]; 2.65
  k = 6:        [1, 2, 1, 1, 1, 2, ...]; 2.625
  ...
  k = infinity: [1, 2, 1, 1, 1, 2, ...]; 2.632904555179...
		

Crossrefs

Programs

  • PARI
    gen(build) = {
    my(S = [1, 2], n = 2, t = 3, L, nPrev, E);
    for(j = 1, build, L = S[#S]; n = n*(1+L)-L; t = t*(1+L)-L^2; nPrev = #S; for(r = 1, L, for(i = 1, nPrev-1, S = concat(S, S[i]))));
    E = S;
    for(j = build + 1, build + #E, L = E[#E+1-(j-build)]; n = n*(1+L)-L; t = t*(1+L)-L^2);
    return(1.0*(2 - t/n)/(t/n - 1))
    } \\ (gradually increase build to get more precise answers)

Extensions

Terms after a(3) corrected by Iain Fox, Jan 16 2018

A298590 Sum of terms of A293630 after generating the sequence for n steps (see comments).

Original entry on oeis.org

3, 5, 9, 17, 47, 93, 185, 369, 1103, 2205, 4409, 13223, 26445, 52889, 105777, 317327, 634653, 1269305, 2538609, 5077217, 15231647, 30463293, 60926585, 182779751, 365559501, 731119001, 1462238001, 4386713999, 8773427997, 26320283987, 52640567973, 105281135945
Offset: 0

Views

Author

Iain Fox, Jan 22 2018

Keywords

Comments

A293630, without generating it, starts as 1, 2. After 1 step, the block to the left is repeated twice and results in 1, 2, 1, 1. Generating a second step gives 1, 2, 1, 1, 1, 2, 1. This continues and a(n) is the sum of the terms at the n-th step.
A291481(n) < a(n) < 2*A291481(n).
Lim_{k->infinity} a(k)/A291481(k) = 1.275261... (see A296564).
Lim_{k->infinity} a(k)^(1/k) = 2.236151... (see A297890).

Examples

			A293630 generated n times.
  n = 0: [1, 2];                   a(0) = 1 + 2 = 3.
  n = 1: [1, 2, 1, 1];             a(1) = 1 + 2 + 1 + 1 = 5.
  n = 2: [1, 2, 1, 1, 1, 2, 1];    a(2) = 1 + 2 + 1 + 1 + 1 + 2 + 1 = 9.
  n = 3: [1, 2, 1, 1, 1, 2, ...];  a(2) = 1 + 2 + 1 + 1 + 1 + 2 + ... = 17.
   ...
		

Crossrefs

Programs

  • PARI
    lista(nn) = {
    my(S = [1, 2], t = 3, L, nPrev, E);
    print1("3, ");
    for(j = 1, nn, L = S[#S]; t = t*(1+L)-L^2; nPrev = #S; for(r = 1, L, for(i = 1, nPrev-1, S = concat(S, S[i]))); print1(t, ", "));
    E = S;
    for(j = nn + 1, nn + #E, L = E[#E+1-(j-nn)]; t = t*(1+L)-L^2; print1(t, ", "));
    }

Formula

a(n) = Sum_{k=1..A291481(n)} A293630(k).
a(n) = (1 + A293630(A291481(n-1)))*a(n-1) - A293630(A291481(n-1))^2.
a(n) ~ d*A291481(n), where d = 1.275261... (see A296564).
a(n) = A298606(A291481(n)).

A298606 Partial sums of A293630.

Original entry on oeis.org

1, 3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 59, 60, 61, 62, 64, 65, 67, 68, 69, 70, 72, 73, 74, 76, 77, 78, 79, 80, 82, 83, 84, 85
Offset: 1

Views

Author

Iain Fox, Jan 22 2018

Keywords

Comments

a(n) is n plus the number of 2's in A293630 on the interval 1..n.

Examples

			A293630 begins 1, 2, 1, 1, 1, 2, 1, 1, 2, ... so:
a(1) = 1.
a(2) = 1 + 2 = 3.
a(3) = 1 + 2 + 1 = 4.
a(4) = 1 + 2 + 1 + 1 = 5.
...
		

Crossrefs

Programs

  • Mathematica
    Accumulate@ Nest[Join @@ {#, Join @@ ConstantArray[Most@ #, Last@ #]} &, {1, 2}, 5] (* Michael De Vlieger, Jan 22 2018 *)
  • PARI
    lista(nn) = my(v=[1, 2], l, w, s=0); for(n=1, nn, l=length(v); w=vector(l-1, i, v[i]); v=concat(v, if(v[l]-1, concat(w, w), w))); for(i=1, length(v), s += v[i]; print1(s, ", "))

Formula

a(A291481(n)) = A298590(n).
Lim_{k->infinity} a(k)/k = 1.275261... (see A296564).
a(n) ~ d*n, where d = 1.275261... (see A296564).

A305393 First differences of A140102.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 23 2018

Keywords

Comments

Although initially this agrees with A293630, the sequences are distinct.
From Michel Dekking, Mar 18 2019: (Start)
Let x be the tribonacci word x = A092782 = 1,2,1,3,1,2,1,1,...
Consider the morphism delta:
1 -> 1112,
2 -> 112,
3 -> 12.
Conjecture: (a(n)) = 12 delta(x).
(End)
Conjecture: This sequence (prefixed by 1 since A140102 should really begin with 0) is 1.TTW(1,2,1) where TTW is the ternary tribonacci word defined in A080843, or equally it is THETA(1,2,1), where THETA is defined in A275925. - N. J. A. Sloane, Mar 19 2019
All these conjectures are now theorems - see the Dekking et al. paper. - N. J. A. Sloane, Jul 22 2019

Crossrefs

For first differences of A140100, A140101, A140102, A140103 see A305392, A305374, A305393, A305394.
Cf. A293630.

Formula

a(n) = A140102(n+1)-A140102(n), n >= 1.
Showing 1-10 of 13 results. Next