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.

A293113 Number T(n,k) of sets of nonempty words with a total of n letters over k-ary alphabet containing the k-th letter such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 3, 1, 0, 2, 8, 4, 1, 0, 3, 20, 16, 5, 1, 0, 4, 47, 53, 25, 6, 1, 0, 5, 106, 173, 102, 36, 7, 1, 0, 6, 237, 532, 410, 172, 49, 8, 1, 0, 8, 522, 1615, 1545, 813, 268, 64, 9, 1, 0, 10, 1146, 4785, 5784, 3576, 1448, 394, 81, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 2,   3,   1;
  0, 2,   8,   4,   1;
  0, 3,  20,  16,   5,   1;
  0, 4,  47,  53,  25,   6,  1;
  0, 5, 106, 173, 102,  36,  7, 1;
  0, 6, 237, 532, 410, 172, 49, 8, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000009 (for n>0), A293883, A293884, A293885, A293886, A293887, A293888, A293889, A293890, A293891.
Row sums give A293114.
T(2n,n) gives A293115.

Programs

  • Maple
    h:= l-> (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(l[k]
        n, 0, g(n-i, i, [l[], i])))))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1, k)*binomial(g(i, k, []), j), j=0..n/i)))
        end:
    T:= (n, k)-> b(n$2, k)-`if`(k=0, 0, b(n$2, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    h[l_] := Function[n, Total[l]!/Product[Product[1 + l[[i]] - j + Sum[If[ l[[k]] n, 0, g[n - i, i, Append[l, i]]]]]];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1, 0, Sum[b[n - i*j, i-1, k]*Binomial[g[i, k, {}], j], {j, 0, n/i}]]];
    T[n_, k_] := b[n, n, k] - If[k == 0, 0, b[n, n, k - 1]];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

T(n,k) = A293112(n,k) - A293112(n,k-1) for k>0, T(n,0) = A293112(n,0).

A293815 Number T(n,k) of sets of exactly k nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; triangle T(n,k), n>=0, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 4, 2, 0, 10, 5, 0, 26, 18, 1, 0, 76, 52, 8, 0, 232, 168, 30, 0, 764, 533, 114, 4, 0, 2620, 1792, 411, 22, 0, 9496, 6161, 1462, 116, 0, 35696, 22088, 5237, 482, 6, 0, 140152, 81690, 18998, 1966, 48, 0, 568504, 313224, 70220, 7682, 274
Offset: 0

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Comments

The smallest nonzero term in column k is A291057(k).

Examples

			T(0,0) = 1: {}.
T(3,1) = 4: {aaa}, {aab}, {aba}, {abc}.
T(3,2) = 2: {a,aa}, {a,ab}.
T(4,2) = 5: {a,aaa}, {a,aab}, {a,aba}, {a,abc}, {aa,ab}.
T(5,3) = 1: {a,aa,ab}.
Triangle T(n,k) begins:
  1;
  0,      1;
  0,      2;
  0,      4,     2;
  0,     10,     5;
  0,     26,    18,     1;
  0,     76,    52,     8;
  0,    232,   168,    30;
  0,    764,   533,   114,    4;
  0,   2620,  1792,   411,   22;
  0,   9496,  6161,  1462,  116;
  0,  35696, 22088,  5237,  482,  6;
  0, 140152, 81690, 18998, 1966, 48;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000085 (for n>0), A293964, A293965, A293966, A293967, A293968, A293969, A293970, A293971, A293972.
Row sums give A293114.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*binomial(g(i), j)*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..15);
  • Mathematica
    g[n_] := g[n] = If[n < 2, 1, g[n - 1] + (n - 1)*g[n - 2]];
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[b[n - i*j, i-1]* Binomial[g[i], j]*x^j, {j, 0, n/i}]]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, n]];
    Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Jun 04 2018, from Maple *)

Formula

G.f.: Product_{j>=1} (1+y*x^j)^A000085(j).

A293112 Number A(n,k) of sets of nonempty words with a total of n letters over k-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 0, 1, 1, 2, 5, 2, 0, 1, 1, 2, 6, 10, 3, 0, 1, 1, 2, 6, 14, 23, 4, 0, 1, 1, 2, 6, 15, 39, 51, 5, 0, 1, 1, 2, 6, 15, 44, 104, 111, 6, 0, 1, 1, 2, 6, 15, 45, 129, 284, 243, 8, 0, 1, 1, 2, 6, 15, 45, 135, 386, 775, 530, 10, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Examples

			Square array A(n,k) begins:
  1, 1,   1,   1,   1,   1,   1,   1, ...
  0, 1,   1,   1,   1,   1,   1,   1, ...
  0, 1,   2,   2,   2,   2,   2,   2, ...
  0, 2,   5,   6,   6,   6,   6,   6, ...
  0, 2,  10,  14,  15,  15,  15,  15, ...
  0, 3,  23,  39,  44,  45,  45,  45, ...
  0, 4,  51, 104, 129, 135, 136, 136, ...
  0, 5, 111, 284, 386, 422, 429, 430, ...
		

Crossrefs

Main diagonal gives A293114.

Programs

  • Maple
    h:= l-> (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(l[k]
        n, 0, g(n-i, i, [l[], i])))))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1, k)*binomial(g(i, k, []), j), j=0..n/i)))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    h[l_] := Function[n, Total[l]!/Product[Product[1 + l[[i]] - j + Sum[If[ l[[k]] n, 0, g[n - i, i, Append[l, i]]]]]];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, k]*Binomial[g[i, k, {}], j], {j, 0, n/i}]]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 03 2018, from Maple *)

Formula

G.f. of column k: Product_{j>=1} (1+x^j)^A182172(j,k).
A(n,k) = Sum_{j=0..k} A293113(n,j).

A293110 Number of multisets of nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.

Original entry on oeis.org

1, 1, 3, 7, 20, 54, 164, 500, 1630, 5472, 19257, 70133, 265858, 1042346, 4235031, 17760943, 76913277, 342919431, 1573637985, 7415371293, 35860511131, 177641956111, 900782461170, 4668600610346, 24714284921937, 133467868645017, 734844788634269, 4120752558254581
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Examples

			a(0) = 1: {}.
a(1) = 1: {a}
a(2) = 3: {a,a}, {aa}, {ab}.
a(3) = 7: {a,a,a}, {a,aa}, {a,ab}, {aaa}, {aab}, {aba}, {abc}.
		

Crossrefs

Main diagonal of A293108.
Row sums of A293109 and of A293808.

Programs

  • Maple
    g:= proc(n) option remember;
          `if`(n<2, 1, g(n-1)+(n-1)*g(n-2))
        end:
    a:= proc(n) option remember; `if`(n=0, 1, add(add(g(d)
          *d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..40);
  • Mathematica
    g[n_] := g[n] = If[n < 2, 1, g[n - 1] + (n - 1)*g[n - 2]];
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[g[d]*d, {d, Divisors[j]}]*a[n - j], {j, 1, n}]/n];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jun 07 2018, from Maple *)

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A000085(j).

A306009 Inverse Weigh transform of A000085.

Original entry on oeis.org

1, 2, 2, 7, 14, 43, 130, 446, 1544, 5773, 22170, 89356, 370198, 1591379, 7020014, 31922981, 148679262, 710828036, 3474337098, 17379964444, 88739068866, 462670294023, 2458638559154, 13317850411827, 73432568553848, 412120738922369, 2351720323257872
Offset: 1

Views

Author

Alois P. Heinz, Jun 16 2018

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember;
          `if`(n<2, 1, g(n-1)+(n-1)*g(n-2))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(a(i), j)*b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= proc(n) option remember; g(n)-b(n, n-1) end:
    seq(a(n), n=1..30);
  • Mathematica
    g[n_] := g[n] = If[n < 2, 1, g[n - 1] + (n - 1)*g[n - 2]];
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[a[i], j]*b[n - i*j, i - 1], {j, 0, n/i}]]];
    a[n_] := a[n] = g[n] - b[n, n - 1];
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Oct 27 2021, after Alois P. Heinz *)

Formula

Product_{k>=1} (1+x^k)^a(k) = Sum_{n>=0} A000085(n) * x^n.
Showing 1-5 of 5 results.