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

A093655 First column of lower triangular matrix A093654.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 7, 1, 2, 2, 7, 2, 7, 7, 41, 1, 2, 2, 7, 2, 7, 7, 41, 2, 7, 7, 41, 7, 41, 41, 397, 1, 2, 2, 7, 2, 7, 7, 41, 2, 7, 7, 41, 7, 41, 41, 397, 2, 7, 7, 41, 7, 41, 41, 397, 7, 41, 41, 397, 41, 397, 397, 6377
Offset: 1

Views

Author

Paul D. Hanna, Apr 08 2004

Keywords

Comments

Related to the number of tournament sequences (A008934).
a(n) equals the number of tournament sequences (A008934) of length A000120(n-1), which is the number of 1's in the binary expansion of n-1.

Crossrefs

Formula

a(2^n) = A008934(n) for n>=0.
a(n) = A008934(A000120(n-1)) for n>=1.

A093657 2^(n-1)-th term of the row sums of triangle A093654.

Original entry on oeis.org

1, 2, 6, 28, 206, 2418, 45970, 1440746, 75840096, 6828414424, 1069361760254, 295609883371824, 146078092162147126, 130419475982163166640, 212257994312591826735888, 634463537260289571176650942
Offset: 1

Views

Author

Paul D. Hanna, Apr 08 2004

Keywords

Crossrefs

Related to the number of tournament sequences (A008934).

Programs

  • Mathematica
    T[n_, k_]:= T[n,k]= If[n<0 || k>n, 0, If[n==k, 1, If[k==0, Sum[T[n-1,j]*T[j,0], {j,0,n-1}], Sum[T[n-1,j]*(T[j,k-1]+T[j,k]), {j,0,n-1}] ]]]; (* T = A097710 *)
    A093657[n_]:= A093657[n]= Sum[T[n,k], {k,0,n}];
    Table[A093657[n], {n,0,30}] (* G. C. Greubel, Feb 21 2024 *)
  • SageMath
    @CachedFunction
    def T(n, k): # T = A097710
        if n< 0 or k<0 or k>n: return 0
        elif k==n: return 1
        elif k==0: return sum(T(n-1,j)*T(j,0) for j in range(n))
        else: return sum(T(n-1, j)*(T(j, k-1)+T(j,k)) for j in range(n))
    def A093657(n): return sum(T(n,k) for k in range(n+1))
    [A093657(n) for n in range(31)] # G. C. Greubel, Feb 21 2024

Formula

a(n) = A093656(2^(n-1)) for n>=1.
a(n) = Sum_{k=0..n} A097710(n,k), row sums of triangle A097710.

A093656 Row sums of lower triangular matrix A093654.

Original entry on oeis.org

1, 2, 2, 6, 2, 6, 6, 28, 2, 6, 6, 28, 6, 28, 28, 206, 2, 6, 6, 28, 6, 28, 28, 206, 6, 28, 28, 206, 28, 206, 206, 2418, 2, 6, 6, 28, 6, 28, 28, 206, 6, 28, 28, 206, 28, 206, 206, 2418, 6, 28, 28, 206, 28, 206, 206, 2418, 28, 206, 206, 2418, 206, 2418, 2418, 45970
Offset: 1

Views

Author

Paul D. Hanna, Apr 08 2004

Keywords

Crossrefs

Cf. A093654.

Formula

a(2^n+1) = 2 for n>=0. a(2^n+2^m) = a(2^(m+1)) for n>m>=0.

A008934 Number of tournament sequences: sequences (a_1, a_2, ..., a_n) with a_1 = 1 such that a_i < a_{i+1} <= 2*a_i for all i.

Original entry on oeis.org

1, 1, 2, 7, 41, 397, 6377, 171886, 7892642, 627340987, 87635138366, 21808110976027, 9780286524758582, 7981750158298108606, 11950197013167283686587, 33046443615914736611839942, 169758733825407174485685959261, 1627880269212042994531083889564192
Offset: 0

Views

Author

Mauro Torelli (torelli(AT)hermes.mc.dsi.unimi.it), Jeffrey Shallit

Keywords

Comments

Also number of Meeussen sequences of length n (see the Cook-Kleber reference).
Column 1 of triangle A093729. Also generated by the iteration procedure that constructs triangle A093654. - Paul D. Hanna, Apr 14 2004
a(n) is the number of sequences (u_1,u_2,...,u_n) of positive integers such that u_1=1 and u_i <= 1+ u_1+...+u_{i-1} for 2<=i<=n. For example, omitting parentheses and commas, a(3)=7 counts 111, 112, 113, 121, 122, 123, 124. The difference-between-successive-terms operator is a bijection from the title sequences to these sequences. For example, the tournament sequence (1, 2, 4, 5, 9, 16) bijects to (1,2,1,4,7). (To count tournament sequences by length, the offset should be 1.) - David Callan, Oct 31 2020

Examples

			The 7 tournament sequences of length 4 are 1234, 1235, 1236, 1245, 1246, 1247, 1248.
		

Crossrefs

Forms column 0 of triangle A097710.

Programs

  • Mathematica
    t[n_?Negative, ] = 0; t[0, ] = 1; t[, 0] = 0; t[n, k_] /; k <= n :=  t[n, k] = t[n, k-1] - t[n-1, k] + t[n-1, 2k-1] + t[n-1, 2 k]; t[n_, k_] /; k > n :=  t[n, k] =Sum[(-1)^(j-1) Binomial[n+1, j]*t[n, k-j] , {j, 1, n+1}]; Table[t[n, 1], {n, 0, 15} ] (* Jean-François Alcover, May 17 2011, after PARI prog. *)
  • PARI
    {T(n,k)=if(n<0,0,if(n==0,1,if(k==0,0, if(k<=n,T(n,k-1)-T(n-1,k)+T(n-1,2*k-1)+T(n-1,2*k), sum(j=1,n+1,(-1)^(j-1)*binomial(n+1,j)*T(n,k-j))))))} /*(Cook-Kleber)*/ a(n)=T(n,1)
    
  • SageMath
    @CachedFunction
    def T(n, k):
        if n<0: return 0
        elif n==0: return 1
        elif k==0: return 0
        elif kA008934(n): return T(n,1)
    [A008934(n) for n in range(31)] # G. C. Greubel, Feb 22 2024

Formula

From Paul D. Hanna, Apr 14 2004: (Start)
a(n) = A093729(n, 1).
a(n) = A093655(2^n). (End)
a(n) = A097710(n, 0). - Paul D. Hanna, Aug 24 2004
From Benedict W. J. Irwin, Nov 26 2016: (Start)
Conjecture: a(n) is given by a series of nested sums as follows:
a(2) = Sum_{i=1..2} 1,
a(3) = Sum_{i=1..2} Sum_{j=1..i+2} 1,
a(4) = Sum_{i=1..2} Sum_{j=1..i+2} Sum_{k=1..i+j+2} 1,
a(5) = Sum_{i=1..2} Sum_{j=1..i+2} Sum_{k=1..i+j+2} Sum_{l=1..i+j+k+2} 1.
(End)

A097710 Lower triangular matrix T, read by rows, such that row (n) is formed from the sums of adjacent terms in row (n-1) of the matrix square T^2, with T(0,0)=1.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 7, 13, 7, 1, 41, 88, 61, 15, 1, 397, 951, 781, 257, 31, 1, 6377, 16691, 15566, 6231, 1041, 63, 1, 171886, 484490, 500057, 231721, 48303, 4161, 127, 1, 7892642, 23701698, 26604323, 13843968, 3406505, 374127, 16577, 255, 1
Offset: 0

Views

Author

Paul D. Hanna, Aug 22 2004

Keywords

Comments

Column 0 is equal to sequence A008934, which is the number of tournament sequences.
This triangle has the same row sums and first column terms as in rows 2^n, for n>=0, of triangle A093654.

Examples

			Rows of this triangle T begin:
       1;
       1,      1;
       2,      3,      1;
       7,     13,      7,      1;
      41,     88,     61,     15,     1;
     397,    951,    781,    257,    31,    1;
    6377,  16691,  15566,   6231,  1041,   63,   1;
  171886, 484490, 500057, 231721, 48303, 4161, 127, 1;
Rows of T^2 begin:
        1;
        2,        1;
        7,        6,        1;
       41,       47,       14,       1;
      397,      554,      227,      30,      1;
     6377,    10314,     5252,     979,     62,     1;
   171886,   312604,   187453,   44268,   4035,   126,   1;
  7892642, 15809056, 10795267, 3048701, 357804, 16323, 254, 1;
The sums of adjacent terms in row (n) of T^2 forms row (n+1) of T:
  T(5,0) = T^2(4,0) = 397;
  T(5,1) = T^2(4,0) + T^2(4,1) = 397 + 554 = 951;
  T(5,2) = T^2(4,1) + T^2(4,2) = 554 + 227 = 781.
Rows of matrix inverse T^(-1) begins:
   1;
  -1,     1;
   1,    -3,      1;
  -1,     8,     -7,     1;
   1,   -25,     44,   -15,      1;
  -1,   111,   -346,   208,    -31,    1;
   1,  -809,   4045, -3720,    912,  -63,    1;
  -1, 10360, -77351, 99776, -35136, 3840, -127, 1; ...
which is a signed version of A097712.
		

Crossrefs

Cf. A008934 (column k=0), A093657 (row sums), A097711 (column k=1).

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = Which[n<0 || k>n, 0, n == k, 1, k == 0, Sum[T[n-1, j]*T[j, 0], {j, 0, n-1}], True, Sum[T[n-1, j]*T[j, k-1], {j, 0, n-1}] + Sum[T[n-1, j]*T[j, k], {j, 0, n-1}]]; Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 23 2016, adapted from PARI *)
  • PARI
    /* Using Recurrence relation: */
    {T(n,k) = if(n<0||k>n, 0, if(n==k,1, if(k==0, sum(j=0,n-1, T(n-1,j)*T(j,0)),  sum(j=0,n-1, T(n-1,j)*T(j,k-1)) + sum(j=0,n-1, T(n-1,j)*T(j,k));)))}
    for(n=0,8, for(k=0,n, print1(T(n,k),", "));print(""))
    
  • PARI
    /* Faster: using Matrix generating method: */
    {T(n,k) = my(M=matrix(2,2,r,c,if(r>=c,1))); for(i=1,n,
    N=matrix(#M+1,#M+1,r,c, if(r>=c, if(r<=#M,M[r,c], if(c>1,(M^2)[r-1,c-1]) + if(c<=#M,(M^2)[r-1,c])) ));
    M=N;); M[n+1,k+1]}
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print("")) \\ Paul D. Hanna, Nov 27 2016
    
  • SageMath
    @CachedFunction
    def T(n, k): # T = A097710
        if n< 0 or k<0 or k>n: return 0
        elif k==n: return 1
        elif k==0: return sum(T(n-1,j)*T(j,0) for j in range(n))
        else: return sum(T(n-1, j)*(T(j, k-1)+T(j,k)) for j in range(n))
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Feb 21 2024

Formula

T(n, k) = T^2(n-1, k-1) + T^2(n-1, k) for n>=1 and k>1, with T(n, 1) = T^2(n-1, 1) and T(n,n) = 1 for n>=0, where T^2 is the matrix square of this triangle T.
T(n, k) = Sum_{j=0..n-1} T(n-1, j)*(T(j, k-1) + T(j,k)), with T(n, 0) = Sum_{j=0..n-1} T(n-1,j)*T(j,0), and T(n, n) = 1.
T(n, 0) = A008934(n).
T(n, 1) = A097711(n).
Sum_{k=0..n} T(n, k) = A093657(n+1) (row sums).
From G. C. Greubel, Feb 21 2024: (Start)
T(n, n-1) = A000225(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n). (End)
Showing 1-5 of 5 results.