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.

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

A279681 Irregular triangle read by rows: possible numbers of diagonals of convex polyhedra having n vertices.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
Offset: 4

Views

Author

Vladimir Letsko, Dec 16 2016

Keywords

Comments

Let n>4 denote the number of vertices. The set of possible numbers of diagonals is the union of sets {(k-1)(n-k-4), ..., (k-1)(n-(k+6)/2)}, where 1 <= k <= floor((sqrt(8n-15)-5)/2), and the set {(k-1)(n-k-4), ..., (n-3)(n-4)/2}, where k = floor((sqrt(8n-15)-3)/2). Note that cardinalities of all sets of this union excluding the last one are consecutive triangular numbers.

Examples

			Triangle begins:
4  | 0;
5  | 0, 1;
6  | 0, 1, 2, 3;
7  | 0, 1, 2, 3, 4, 5, 6;
8  | 0, 2, 3, 4, 5, 6, 7,  8,  9, 10;
9  | 0, 3, 4, 5, 6, 7, 8,  9, 10, 11, 12, 13, 14, 15;
10 | 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21;
		

Crossrefs

Row lengths are in A023536.

Programs

  • Maple
    dm:=(n, k)->simplify((n-1)*n/2-(2*n-k-1)-(n-k)*(n-k-3)/2-2*(k-1)-(k+2)*(k-1)/2);
    dM:=(n, k)->simplify((n-1)*n/2-2*n-k+3-(n-k)*(n-k-3)/2);
    Dv:=proc(n) local k, DD; DD:={0}:for k from 2 to n/2-1 do
    DD:=DD union {seq(i, i=dm(n, k)..dM(n, k))} od:
    DD:=DD union {seq(i, i=dm(n, k-1)..(n-3)*(n-4)/2)}:
    DD end;
Showing 1-2 of 2 results.