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

A293109 Number T(n,k) of multisets 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, 2, 1, 0, 3, 3, 1, 0, 5, 10, 4, 1, 0, 7, 24, 17, 5, 1, 0, 11, 62, 58, 26, 6, 1, 0, 15, 140, 193, 107, 37, 7, 1, 0, 22, 329, 603, 439, 178, 50, 8, 1, 0, 30, 725, 1852, 1663, 852, 275, 65, 9, 1, 0, 42, 1631, 5539, 6283, 3767, 1500, 402, 82, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0,  1;
  0,  2,   1;
  0,  3,   3,   1;
  0,  5,  10,   4,   1;
  0,  7,  24,  17,   5,   1;
  0, 11,  62,  58,  26,   6,  1;
  0, 15, 140, 193, 107,  37,  7, 1;
  0, 22, 329, 603, 439, 178, 50, 8, 1;
		

Crossrefs

Columns k=0-10 give: A000007, A000041 (for n>0), A293797, A293798, A293799, A293800, A293801, A293802, A293803, A293804, A293805.
Row sums give A293110.
T(2n,n) gives A293111.

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:
    A:= proc(n, k) option remember; `if`(n=0, 1, add(add(g(d, k, [])
          *d, d=numtheory[divisors](j))*A(n-j, k), j=1..n)/n)
        end:
    T:= (n, k)-> A(n, k) -`if`(k=0, 0, A(n, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    h[l_] := Function[n, Total[l]!/Product[Product[1 + l[[i]] - j + Sum[If[l[[k]] < j, 0, 1], {k, i + 1, n}], {j, 1, l[[i]]}], {i, n}]][Length[l]];
    g[n_, i_, l_] := g[n, i, l] = If[n == 0, h[l], If[i < 1, 0, If[i == 1, h[Join[l, Table[1, n]]], g[n, i - 1, l] + If[i > n, 0, g[n - i, i, Append[l, i]]]]]];
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[g[d, k, {}]*d, {d, Divisors[j]}]*A[n - j, k], {j, 1, n}]/n];
    T[n_, 0] := A[n, 0]; T[n_, k_] := A[n, k] - A[n, k - 1];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 09 2018, after Alois P. Heinz *)

Formula

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

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).

A293114 Number of sets 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, 2, 6, 15, 45, 136, 430, 1415, 4845, 17235, 63509, 242854, 959904, 3926209, 16564083, 72097127, 322898943, 1487602607, 7034420691, 34122991199, 169499127425, 861596397518, 4475340840980, 23738200183570, 128427236055296, 708248486616539, 3977551340260517
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Examples

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

Crossrefs

Main diagonal of A293112.
Row sums of A293113 and of A293815.

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(b(n-i*j, i-1)*binomial(g(i), j), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);
  • 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[b[n - i*j, i - 1]* Binomial[g[i], j], {j, 0, n/i}]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 06 2018, from Maple *)

Formula

G.f.: Product_{j>=1} (1+x^j)^A000085(j).
Weigh transform of A000085.

A293115 Number of sets of nonempty words with a total of 2n letters over n-ary alphabet containing the n-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.

Original entry on oeis.org

1, 1, 8, 53, 410, 3576, 35878, 391136, 4666521, 59096165, 797628339, 11282268353, 167582833398, 2587994886476, 41585338511800, 690912445945576, 11870082701946292, 209995330141487944, 3824511903396303251, 71496027436457015058, 1371314535020854180410
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Crossrefs

Formula

a(n) = A293113(2n,n).

A293883 Number of sets of nonempty words with a total of n letters over binary alphabet containing the second letter 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, 3, 8, 20, 47, 106, 237, 522, 1146, 2485, 5406, 11644, 25157, 53964, 116003, 247987, 530999, 1131889, 2415431, 5135838, 10927816, 23182209, 49199697, 104154808, 220543306, 465996956, 984704338, 2076988457, 4380764354, 9225209588, 19424813915, 40844509107
Offset: 2

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=2 of A293113.

Formula

a(n) = A293741(n) - A000009(n).

A293884 Number of sets of nonempty words with a total of n letters over ternary alphabet containing the third letter 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, 4, 16, 53, 173, 532, 1615, 4785, 14066, 40908, 118438, 341253, 981200, 2815762, 8075265, 23149097, 66373778, 190376443, 546401592, 1569387414, 4511532695, 12980998062, 37385342522, 107771434819, 310967929569, 898108427259, 2596180252466, 7511411442182
Offset: 3

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=3 of A293113.

Formula

a(n) = A293742(n) - A293741(n).

A293885 Number of sets of nonempty words with a total of n letters over quaternary alphabet containing the fourth letter 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, 5, 25, 102, 410, 1545, 5784, 21015, 76248, 272377, 974208, 3455177, 12287351, 43502174, 154554897, 547955950, 1950335934, 6937352521, 24777223885, 88515560121, 317513893877, 1139848959317, 4108296484542, 14823490668322, 53689879422115, 194704264528116
Offset: 4

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=4 of A293113.

Formula

a(n) = A293743(n) - A293742(n).

A293886 Number of sets of nonempty words with a total of n letters over quinary alphabet containing the fifth letter 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, 6, 36, 172, 813, 3576, 15647, 66493, 282063, 1181554, 4951592, 20648077, 86254964, 359920291, 1505749933, 6305449303, 26485669295, 111485395542, 470834817242, 1993891398761, 8472782274541, 36113575773694, 154458283438023, 662716935400473, 2853093892389838
Offset: 5

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=5 of A293113.

Formula

a(n) = A293744(n) - A293743(n).

A293887 Number of sets of nonempty words with a total of n letters over senary alphabet containing the sixth letter 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, 7, 49, 268, 1448, 7228, 35878, 172470, 828380, 3924415, 18627313, 87940196, 416581962, 1971018227, 9364427840, 44535275966, 212749669917, 1018545160923, 4898593478484, 23625691956720, 114460931725922, 556278543737430, 2715406810871312, 13298453769286699
Offset: 6

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=6 of A293113.

Formula

a(n) = A293745(n) - A293744(n).

A293888 Number of sets of nonempty words with a total of n letters over septenary alphabet containing the seventh letter 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, 8, 64, 394, 2390, 13297, 73408, 391136, 2079440, 10889818, 57092581, 297655901, 1556501986, 8132631687, 42662224461, 224171916523, 1183189769473, 6263511343367, 33311244068612, 177803544643092, 953453596829798, 5132942333604244, 27758886429083153
Offset: 7

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=7 of A293113.

Formula

a(n) = A293746(n) - A293745(n).
Showing 1-10 of 13 results. Next