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

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

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)).
Showing 1-2 of 2 results.