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

A016121 Number of sequences (a_1, a_2, ..., a_n) of length n with a_1 = 1 satisfying a_i <= a_{i+1} <= 2*a_i.

Original entry on oeis.org

1, 2, 5, 17, 86, 698, 9551, 226592, 9471845, 705154187, 94285792211, 22807963405043, 10047909839840456, 8110620438438750647, 12062839548612627177590, 33226539134943667506533207, 170288915434579567358828997806, 1630770670148598007261992936663653
Offset: 0

Views

Author

Keywords

Comments

Number of n X n binary symmetric matrices with rows, considered as binary numbers, in nondecreasing order. - R. H. Hardin, May 30 2008
Also, number of (n+1) X (n+1) binary symmetric matrices with zero main diagonal and rows, considered as binary numbers, in nondecreasing order. - Max Alekseyev, Feb 06 2022

Crossrefs

Row sums of triangle A097712.

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = If[n < 0 || k > n, 0, If[n == k, 1, If[k == 0, 1, T[n - 1, k] + Sum[T[n - 1, j] T[j, k - 1], {j, 0, n - 1}]]]];
    a[n_] := Sum[T[n, k], {k, 0, n}];
    a /@ Range[0, 20] (* Jean-François Alcover, Oct 02 2019 *)
  • SageMath
    @CachedFunction
    def T(n, k): # T = A097712
        if k<0 or k>n: return 0
        elif k==0 or k==n: return 1
        else: return T(n-1, k) + sum(T(n-1, j)*T(j, k-1) for j in range(n))
    def A016121(n): return sum(T(n,k) for k in range(n+1))
    [A016121(n) for n in range(31)] # G. C. Greubel, Feb 21 2024

Formula

a(n) = Sum_{k=0..n} A097712(n, k). - Paul D. Hanna, Aug 24 2004
Equals the binomial transform of A008934 (number of tournament sequences): a(n) = Sum_{k=0..n} C(n, k)*A008934(k). - Paul D. Hanna, Sep 18 2005

A113089 Number of 3-tournament sequences: a(n) gives the number of increasing sequences of n positive integers (t_1,t_2,...,t_n) such that t_1 = 2 and t_i = 2 (mod 2) and t_{i+1} <= 3*t_i for 1

Original entry on oeis.org

1, 2, 10, 114, 2970, 182402, 27392682, 10390564242, 10210795262650, 26494519967902114, 184142934938620227530, 3466516611360924222460082, 178346559667060145108789818842, 25264074391478558474014952210052802
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Column 0 of triangle A113088; A113088 is the matrix square of triangle A113084, which satisfies the matrix recurrence: A113084(n,k) = [A113084^3](n-1,k-1) + [A113084^3](n-1,k). Also equals column 2 of square table A113081.

Examples

			The tree of 3-tournament sequences of even integer
descendents of a node labeled (2) begins:
[2]; generation 1: 2->[4,6];
generation 2: 4->[6,8,10,12], 6->[8,10,12,14,16,18]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^3)[r-1,c-1])+(M^3)[r-1,c]))); return((M^2)[n+1,1])}

A113100 Number of 4-tournament sequences: a(n) gives the number of increasing sequences of n positive integers (t_1,t_2,...,t_n) such that t_1 = 3 and t_i = 3 (mod 3) and t_{i+1} <= 4*t_i for 1

Original entry on oeis.org

1, 3, 27, 693, 52812, 12628008, 9924266772, 26507035453923, 246323730279500082, 8100479557816637139288, 954983717308947379891713642, 407790020849346203244152231395953
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Column 0 of triangle A113099; A113099 is the matrix cube of triangle A113095, which satisfies the matrix recurrence: A113095(n,k) = [A113095^4](n-1,k-1) + [A113095^4](n-1,k). Also equals column 3 of square table A113092.

Examples

			The tree of 4-tournament sequences of descendents of a node labeled (3) begins:
[3]; generation 1: 3->[6,9,12]; generation 2:
6->[9,12,15,18,21,24], 9->[12,15,18,21,24,27,30,33,36],
12->[15,18,21,24,27,30,33,36,39,42,45,48]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^4)[r-1,c-1])+(M^4)[r-1,c]))); return((M^3)[n+1,1])}

A113113 Number of 5-tournament sequences: a(n) gives the number of increasing sequences of n positive integers (t_1,t_2,...,t_n) such that t_1 = 4 and t_i = 4 (mod 4) and t_{i+1} <= 5*t_i for 1

Original entry on oeis.org

1, 4, 56, 2704, 481376, 337587520, 978162377600, 12088945462984960, 651451173346940188160, 155573037664478034394215424, 166729581953452524706695313356800
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Column 0 of triangle A113112; A113112 is the matrix 4th power of triangle A113106, which satisfies the matrix recurrence: A113106(n,k) = [A113106^5](n-1,k-1) + [A113106^5](n-1,k). Also equals column 4 of square table A113103.

Examples

			The tree of 5-tournament sequences of descendents
of a node labeled (4) begins:
[4]; generation 1: 4->[8,12,16,20];
generation 2: 8->[12,16,20,24,28,32,36,40],
12->[16,20,24,28,32,36,40,44,48,52,56,60],
16->[20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80],
20->[24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100];
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^5)[r-1,c-1])+(M^5)[r-1,c]))); return((M^4)[n+1,1])}

A113096 Number of 4-tournament sequences: a(n) gives the number of increasing sequences of n positive integers (t_1,t_2,...,t_n) such that t_1 = 1 and t_i = 1 (mod 3) and t_{i+1} <= 4*t_i for 1

Original entry on oeis.org

1, 1, 4, 46, 1504, 146821, 45236404, 46002427696, 159443238441379, 1926751765436372746, 82540801108546193896804, 12696517688186899788062326096, 7084402815778394692932546017050054
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Equals column 0 of triangle A113095, which satisfies: A113095(n,k) = [A113095^4](n-1,k-1) + [A113095^4](n-1,k).

Examples

			The tree of 4-tournament sequences of descendents
of a node labeled (1) begins:
[1]; generation 1: 1->[4]; generation 2: 4->[7,10,13,16];
generation 3: 7->[10,13,16,19,22,25,28],
10->[13,16,19,22,25,28,31,34,37,40],
13->[16,19,22,25,28,31,34,37,40,43,46,49,52],
16->[19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^4)[r-1,c-1])+(M^4)[r-1,c]))); return(M[n+1,1])}

A113098 Number of 4-tournament sequences: a(n) gives the number of increasing sequences of n positive integers (t_1,t_2,...,t_n) such that t_1 = 2 and t_i = 2 (mod 3) and t_{i+1} <= 4*t_i for 1

Original entry on oeis.org

1, 2, 13, 242, 13228, 2241527, 1237069018, 2305369985312, 14874520949557933, 338242806223319079422, 27474512329417917714396073, 8057337874806992183898478061882, 8607002252619465665736907583406214288
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Equals column 0 of triangle A113097 = A113095^2 (matrix square), where: A113095(n,k) = [A113095^4](n-1,k-1) + [A113095^4](n-1,k).

Examples

			The tree of 4-tournament sequences of descendents
of a node labeled (2) begins:
[2]; generation 1: 2->[5,8]; generation 2:
5->[8,11,14,17,20], 8->[11,14,17,20,23,26,29,32]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^4)[r-1,c-1])+(M^4)[r-1,c]))); return((M^2)[n+1,1])}

A113107 Number of 5-tournament sequences: a(n) gives the number of increasing sequences of n positive integers (t_1,t_2,...,t_n) such that t_1 = 1 and t_i = 1 (mod 4) and t_{i+1} <= 5*t_i for 1

Original entry on oeis.org

1, 1, 5, 85, 4985, 1082905, 930005021, 3306859233805, 50220281721033905, 3328966349792343354865, 978820270264589718999911669, 1292724512951963810375572954693765
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Equals column 0 of triangle A113106 which satisfies recurrence: A113106(n,k) = [A113106^5](n-1,k-1) + [A113106^5](n-1,k), where A113106^5 is the matrix 5th power.

Examples

			The tree of 5-tournament sequences of descendents
of a node labeled (1) begins:
[1]; generation 1: 1->[5]; generation 2: 5->[9,13,17,21,25]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^5)[r-1,c-1])+(M^5)[r-1,c]))); return(M[n+1,1])}

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)

A113078 Number of tournament sequences: a(n) gives the number of n-th generation descendents of a node labeled (4) in the tree of tournament sequences.

Original entry on oeis.org

1, 4, 26, 274, 4721, 134899, 6501536, 537766009, 77598500096, 19821981700354, 9077118324755246, 7531446638893873684, 11423775838657143826346, 31914367054676982206368909, 165251261153335414813452988541
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Equals column 4 of square table A093729. Also equals column 0 of the matrix 4th power of triangle A097710, which satisfies the matrix recurrence: A097710(n,k) = [A097710^2](n-1,k-1) + [A097710^2](n-1,k) for n>k>=0.

Examples

			The tree of tournament sequences of descendents of a node labeled (4) begins:
[4]; generation 1: 4->[5,6,7,8]; generation 2: 5->[6,7,8,9,10],
6->[7,8,9,10,11,12], 7->[8,9,10,11,12,13,14],
8->[9,10,11,12,13,14,15,16]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n,q=2)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^q)[r-1,c-1])+(M^q)[r-1,c]))); return((M^4)[n+1,1])}

A113079 Number of tournament sequences: a(n) gives the number of n-th generation descendents of a node labeled (5) in the tree of tournament sequences.

Original entry on oeis.org

1, 5, 40, 515, 10810, 376175, 22099885, 2231417165, 393643922005, 123097221805100, 69087264010363930, 70321483026073531730, 130954011392485408662370, 449450774746306949114288795
Offset: 0

Views

Author

Paul D. Hanna, Oct 14 2005

Keywords

Comments

Equals column 5 of square table A093729. Also equals column 0 of the matrix 5th power of triangle A097710, which satisfies the matrix recurrence: A097710(n,k) = [A097710^2](n-1,k-1) + [A097710^2](n-1,k) for n>k>=0.

Examples

			The tree of tournament sequences of descendents of a node labeled (5) begins:
[5]; generation 1: 5->[6,7,8,9,10]; generation 2:
6->[7,8,9,10,11,12], 7->[8,9,10,11,12,13,14],
8->[9,10,11,12,13,14,15,16], 9->[10,11,12,13,14,15,16,17,18],
10->[11,12,13,14,15,16,17,18,19,20]; ...
Then a(n) gives the number of nodes in generation n.
Also, a(n+1) = sum of labels of nodes in generation n.
		

Crossrefs

Programs

  • PARI
    {a(n,q=2)=local(M=matrix(n+1,n+1));for(r=1,n+1, for(c=1,r, M[r,c]=if(r==c,1,if(c>1,(M^q)[r-1,c-1])+(M^q)[r-1,c]))); return((M^5)[n+1,1])}
Showing 1-10 of 25 results. Next