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.

A125810 Triangle of q-Bell number coefficients, read by rows that form polynomials in q, giving the eigensequence for the triangle of q-binomial coefficients.

Original entry on oeis.org

1, 1, 2, 4, 1, 8, 4, 3, 16, 12, 13, 8, 3, 32, 32, 42, 38, 33, 15, 10, 1, 64, 80, 120, 133, 145, 121, 98, 60, 37, 15, 4, 128, 192, 320, 408, 507, 526, 544, 457, 391, 281, 195, 104, 61, 20, 6, 256, 448, 816, 1160, 1585, 1875, 2189, 2259, 2256, 2066, 1819, 1450, 1133, 777, 506, 300, 158, 65, 25, 4
Offset: 0

Views

Author

Paul D. Hanna, Dec 10 2006

Keywords

Comments

Row n evaluated at sample values of q are as follows:
R_n(q=1) = A000110(n) (Bell numbers);
R_n(q=-1) = A080107(n) (fixed points of permutation of SetPartitions);
R_n(q=2) = A125812; R_n(q=3) = A125813; R_n(q=4) = A125814; R_n(q=5) = A125815.
T(n,k) is the number of set partitions of [n] having exactly k inversions. T(5,4)=3: 145|23, 145|2|3, 15|24|3; T(6,6) = 10: 1456|23, 156|234, 156|23|4, 1456|2|3, 146|25|3, 16|245|3, 156|2|34, 16|25|34, 156|2|3|4, 16|25|3|4. - Alois P. Heinz, Apr 03 2016

Examples

			Row g.f.s B_q(n) are polynomials in q generated by:
B_q(n) = Sum_{j=0..n-1} B_q(j) * C_q(n-1,j) for n>0 with B_q(0)=1
where the triangle of q-binomial coefficients C_q(n,k) begins:
1;
1, 1;
1, 1 + q, 1;
1, 1 + q + q^2, 1 + q + q^2, 1;
1, 1 + q + q^2 + q^3, 1 + q + 2*q^2 + q^3 + q^4, 1 + q + q^2 + q^3, 1;
The initial q-Bell coefficients in B_q(n) are:
B_q(0) = 1; B_q(1) = 1; B_q(2) = 2;
B_q(3) = 4 + q;
B_q(4) = 8 + 4*q + 3*q^2;
B_q(5) = 16 + 12*q + 13*q^2 + 8*q^3 + 3*q^4;
B_q(6) = 32 + 32*q + 42*q^2 + 38*q^3 + 33*q^4 + 15*q^5 + 10*q^6 + q^7.
Number of terms in row n is given by A125811, which starts:
1,1,1,2,3,5,8,11,15,20,26,32,39,47,56,66,76,87,99,112,126,141,156,...
Triangle begins:
    1;
    1;
    2;
    4,   1;
    8,   4,   3;
   16,  12,  13,    8,    3;
   32,  32,  42,   38,   33,   15,   10,    1;
   64,  80, 120,  133,  145,  121,   98,   60,   37,   15,    4;
  128, 192, 320,  408,  507,  526,  544,  457,  391,  281,  195,  104,   61,  20, 6;
  256, 448, 816, 1160, 1585, 1875, 2189, 2259, 2256, 2066, 1819, 1450, 1133, 777, 506, 300, 158, 65, 25, 4;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(o, u, t) option remember; expand(
         `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2), 0)+add(x^(u+j-1)*
            b(o-j, u+j-1, min(2, t+1)), j=`if`(t=0, 1, 1..o))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Feb 21 2025
  • Mathematica
    QB[n_, q_] := QB[n, q] = Sum[QB[j, q] QBinomial[n-1, j, q], {j, 0, n-1}] // FunctionExpand // Simplify; QB[0, q_]=1; QB[1, q_]=1; Table[ CoefficientList[QB[n, q], q], {n, 0, 9}] // Flatten (* Jean-François Alcover, Feb 29 2016 *)
  • PARI
    /* q-Binomial coefficients: */
    {C_q(n, k) = if(n
    				

Formula

T(n,0) = 2^(n-1) for n>0. G.f. of row n is a polynomial in q, B_q(n), that is generated by the recurrence: B_q(n) = Sum_{j=0..n-1} B_q(j) * C_q(n-1,j) for n>0, with B_q(0)=1. The q-binomial coefficient (also called Gaussian binomial coefficient) is given by: C_q(n,k) = [Product_{i=n-k+1..n} (1-q^i)]/[Product_{j=1..k} (1-q^j)].
Sum_{k>0} k * T(n,k) = A264082(n). - Alois P. Heinz, Apr 03 2016

A125811 Number of coefficients in the n-th q-Bell number as a polynomial in q.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 11, 15, 20, 26, 32, 39, 47, 56, 66, 76, 87, 99, 112, 126, 141, 156, 172, 189, 207, 226, 246, 267, 288, 310, 333, 357, 382, 408, 435, 463, 491, 520, 550, 581, 613, 646, 680, 715, 751, 787, 824, 862, 901, 941, 982, 1024, 1067, 1111, 1156, 1201
Offset: 0

Views

Author

Paul D. Hanna, Dec 10 2006

Keywords

Examples

			This sequence gives the number of terms in rows of A125810.
Row g.f.s B_q(n) of A125810 are polynomials in q generated by:
B_q(n) = Sum_{j=0..n-1} B_q(j) * C_q(n-1,j) for n>0 with B_q(0)=1
where the triangle of q-binomial coefficients C_q(n,k) begins:
  1;
  1, 1;
  1, 1 + q, 1;
  1, 1 + q + q^2, 1 + q + q^2, 1;
  1, 1 + q + q^2 + q^3, 1 + q + 2*q^2 + q^3 + q^4, 1 + q + q^2 + q^3, 1;
The initial q-Bell coefficients in B_q(n) are:
  B_q(0) = 1; B_q(1) = 1; B_q(2) = 2;
  B_q(3) = 4 + q;
  B_q(4) = 8 + 4*q + 3*q^2;
  B_q(5) = 16 + 12*q + 13*q^2 + 8*q^3 + 3*q^4;
  B_q(6) = 32 + 32*q + 42*q^2 + 38*q^3 + 33*q^4 + 15*q^5 + 10*q^6 + q^7.
		

Crossrefs

Programs

  • Maple
    Cq:= proc(n,k) local j; if n nops(Bq(n)): seq(a(n), n=0..60); # Alois P. Heinz, Aug 04 2009
  • Mathematica
    QB[n_, q_] := QB[n, q] = Sum[QB[j, q] QBinomial[n-1, j, q], {j, 0, n-1}] // FunctionExpand // Simplify; QB[0, q_]=1; QB[1, q_]=1; a[n_] := CoefficientList[QB[n, q], q] // Length; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 60}] (* Jean-François Alcover, Feb 29 2016 *)
  • PARI
    /* q-Binomial coefficients: */
    C_q(n,k)=if(n
    				
  • Python
    from math import comb, isqrt
    def A125811(n): return 1+comb(n,2)-sum(isqrt((k<<3)+1)-1>>1 for k in range(1,n)) # Chai Wah Wu, Feb 27 2025

Formula

a(n) = A023536(n-2) + 1.
a(n) = n*(n+1)/2 - 4 - Sum_{k=2..n-2} floor(1/2 + sqrt(2*k+4)) for n>2. [Due to a formula by Jan Hagberg in A023536]

Extensions

More terms from Alois P. Heinz, Aug 04 2009

A125812 q-Bell numbers for q=2; eigensequence of A022166, which is the triangle of Gaussian binomial coefficients [n,k] for q=2.

Original entry on oeis.org

1, 1, 2, 6, 28, 204, 2344, 43160, 1291952, 63647664, 5218320672, 719221578080, 168115994031040, 67159892835119296, 46166133463916209792, 54941957091151982047616, 113826217192695041078973184, 412563248965919999955196308224, 2627807814905396804499456018866688
Offset: 0

Views

Author

Paul D. Hanna, Dec 10 2006

Keywords

Examples

			The recurrence a(n) = Sum_{k=0..n-1} A022166(n-1,k) * a(k) is illustrated by:
a(2) = 1*(1) + 3*(1) + 1*(2) = 6;
a(3) = 1*(1) + 7*(1) + 7*(2) + 1*(6) = 28;
a(4) = 1*(1) + 15*(1) + 35*(2) + 15*(6) + 1*(28) = 204.
Triangle A022166 begins:
1;
1, 1;
1, 3, 1;
1, 7, 7, 1;
1, 15, 35, 15, 1;
1, 31, 155, 155, 31, 1;
1, 63, 651, 1395, 651, 63, 1; ...
		

Crossrefs

Programs

  • Maple
    b:= proc(o, u, t) option remember;
         `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2), 0)+add(2^(u+j-1)*
            b(o-j, u+j-1, min(2, t+1)), j=`if`(t=0, 1, 1..o)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..18);  # Alois P. Heinz, Feb 21 2025
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[QBinomial[n-1, k, 2] a[k], {k, 0, n-1}]; Table[a[n], {n, 0, 16}] (* Jean-François Alcover, Apr 09 2016 *)
  • PARI
    /* q-Binomial coefficients: */ {C_q(n,k)=if(n
    				

Formula

a(n) = Sum_{k=0..n-1} A022166(n-1,k) * a(k) for n>0, with a(0)=1.
a(n) = Sum_{k>=0} 2^k * A125810(n,k). - Alois P. Heinz, Feb 21 2025

A125813 q-Bell numbers for q=3; eigensequence of A022167, which is the triangle of Gaussian binomial coefficients [n,k] for q=3.

Original entry on oeis.org

1, 1, 2, 7, 47, 628, 17327, 1022983, 132615812, 38522717107, 25526768401271, 39190247441314450, 141213238745969102393, 1207367655155905204747681, 24733467452839301566047854678, 1224709126636123500201799360630423, 147747406166666863538672620806542995763
Offset: 0

Views

Author

Paul D. Hanna, Dec 10 2006

Keywords

Examples

			The recurrence: a(n) = Sum_{k=0..n-1} A022167(n-1,k) * a(k) is illustrated by:
  a(2) = 1*(1) + 4*(1) + 1*(2) = 7;
  a(3) = 1*(1) + 13*(1) + 13*(2) + 1*(7) = 47;
  a(4) = 1*(1) + 40*(1) + 130*(2) + 40*(7) + 1*(47) = 628.
Triangle A022167 begins:
  1;
  1, 1;
  1, 4, 1;
  1, 13, 13, 1;
  1, 40, 130, 40, 1;
  1, 121, 1210, 1210, 121, 1;
  1, 364, 11011, 33880, 11011, 364, 1;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(o, u, t) option remember;
         `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2), 0)+add(3^(u+j-1)*
            b(o-j, u+j-1, min(2, t+1)), j=`if`(t=0, 1, 1..o)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..18);  # Alois P. Heinz, Feb 21 2025
  • Mathematica
    b[o_, u_, t_] := b[o, u, t] =
       If[u + o == 0, 1, If[t > 0, b[u + o, 0, 0], 0] + Sum[3^(u + j - 1)*
       b[o - j, u + j - 1, Min[2, t + 1]], {j, If[t == 0, {1}, Range[o]]}]];
    a[n_] := b[n, 0, 0];
    Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Mar 15 2025, after Alois P. Heinz *)
  • PARI
    /* q-Binomial coefficients: */
    C_q(n,k)=if(n
    				

Formula

a(n) = Sum_{k=0..n-1} A022167(n-1,k) * a(k) for n>0, with a(0)=1.
a(n) = Sum_{k>=0} 3^k * A125810(n,k). - Alois P. Heinz, Feb 21 2025

A125814 q-Bell numbers for q=4; eigensequence of A022168, which is the triangle of Gaussian binomial coefficients [n,k] for q=4.

Original entry on oeis.org

1, 1, 2, 8, 72, 1552, 84416, 12107584, 4726583424, 5150624868864, 16010990175691264, 144648776120641766400, 3857411545088966609514496, 307705704204270334224705015808, 74294186209325019487040708053442560, 54874536782175258883045772243829235417088
Offset: 0

Views

Author

Paul D. Hanna, Dec 10 2006

Keywords

Examples

			The recurrence: a(n) = Sum_{k=0..n-1} A022168(n-1,k) * a(k) is illustrated by:
  a(2) = 1*(1) + 5*(1) + 1*(2) = 8;
  a(3) = 1*(1) + 21*(1) + 21*(2) + 1*(8) = 72;
  a(4) = 1*(1) + 85*(1) + 357*(2) + 85*(8) + 1*(72) = 1552.
Triangle A022168 begins:
  1;
  1,    1;
  1,    5,     1;
  1,   21,    21,      1;
  1,   85,   357,     85,     1;
  1,  341,  5797,   5797,   341,    1;
  1, 1365, 93093, 376805, 93093, 1365, 1;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(o, u, t) option remember;
         `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2), 0)+add(4^(u+j-1)*
            b(o-j, u+j-1, min(2, t+1)), j=`if`(t=0, 1, 1..o)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..18);  # Alois P. Heinz, Feb 21 2025
  • Mathematica
    b[o_, u_, t_] := b[o, u, t] =
       If[u + o == 0, 1, If[t > 0, b[u + o, 0, 0], 0] + Sum[4^(u + j - 1)*
       b[o - j, u + j - 1, Min[2, t + 1]], {j, If[t == 0, {1}, Range[o]]}]];
    a[n_] := b[n, 0, 0];
    Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Mar 15 2025, after Alois P. Heinz *)
  • PARI
    /* q-Binomial coefficients: */
    {C_q(n,k)=if(n
    				

Formula

a(n) = Sum_{k=0..n-1} A022168(n-1,k) * a(k) for n>0, with a(0)=1.
a(n) = Sum_{k>=0} 4^k * A125810(n,k). - Alois P. Heinz, Feb 21 2025

A381369 A(n,k) is the sum over all partitions of [n] of k^j for a partition with j inversions; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 5, 8, 1, 1, 2, 6, 15, 16, 1, 1, 2, 7, 28, 52, 32, 1, 1, 2, 8, 47, 204, 203, 64, 1, 1, 2, 9, 72, 628, 2344, 877, 128, 1, 1, 2, 10, 103, 1552, 17327, 43160, 4140, 256, 1, 1, 2, 11, 140, 3276, 84416, 1022983, 1291952, 21147, 512
Offset: 0

Views

Author

Alois P. Heinz, Feb 21 2025

Keywords

Examples

			Square array A(n,k) begins:
   1,   1,    1,     1,     1,      1,      1, ...
   1,   1,    1,     1,     1,      1,      1, ...
   2,   2,    2,     2,     2,      2,      2, ...
   4,   5,    6,     7,     8,      9,     10, ...
   8,  15,   28,    47,    72,    103,    140, ...
  16,  52,  204,   628,  1552,   3276,   6172, ...
  32, 203, 2344, 17327, 84416, 307867, 915848, ...
		

Crossrefs

Columns k=0-5 give: A011782, A000110, A125812, A125813, A125814, A125815.
Main diagonal gives A381373.

Programs

  • Maple
    b:= proc(o, u, t, k) option remember;
         `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2, k), 0)+add(k^(u+j-1)*
            b(o-j, u+j-1, min(2, t+1), k), j=`if`(t=0, 1, 1..o)))
        end:
    A:= (n, k)-> b(n, 0$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    Unprotect[Power]; 0^0 = 1; Protect[Power];
    b[o_, u_, t_, k_] := b[o, u, t, k] =
       If[u + o == 0, 1, If[t > 0, b[u + o, 0, 0, k], 0] + Sum[k^(u + j - 1)*
       b[o - j, u + j - 1, Min[2, t + 1], k], {j, If[t == 0, {1}, Range[o]]}]];
    A[n_, k_] := b[n, 0, 0, k];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Mar 15 2025, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j>=0} k^j * A125810(n,j).

A143777 Eigentriangle of triangle A022167.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 13, 26, 7, 1, 40, 260, 280, 47, 1, 121, 2420, 8470, 5687, 628
Offset: 0

Views

Author

Gary W. Adamson, Aug 31 2008

Keywords

Comments

Row sums of the triangle = A125813 shifted one place to the left = (1, 2, 7, 47, 628,...).
Row sums of row n terms = rightmost term of row (n+1).
Example: rightmost term of row 3 = 7 = (1 + 4 + 2).
Triangle A022167 =
1;
1, 1;
1, 4, 1;
1, 13, 13, 1;
1, 40, 130, 40, 1;
... The eigensequence of A022167 = A125815: (1, 1, 2, 7, 47, 628, 17327,...).
Triangle A143777 applies a termwise product of the first n terms of (1, 1, 2, 7, 47,...) and the (n-1)-th row terms of triangle A022167.

Examples

			First few rows of the triangle are:
  1;
  1, 1;
  1, 4, 2;
  1, 13, 26, 7;
  1, 40, 260, 280, 47;
  1, 121, 2420, 8470, 5687, 628;
  ...
Row 3 = (1, 13, 26, 7) = termwise product of (1, 13, 13, 1) and (1, 1, 2, 7); where (1, 13, 13, 1) = row 3 of triangle A022167 and (1, 1, 2, 7) = the first 4 terms of A125813, the eigensequence of A022167.
		

Crossrefs

Formula

Triangle read by rows, A022167 * (A125813 * 0^(n-k)); 0<=k<=n
Showing 1-7 of 7 results.