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

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

A293108 Number A(n,k) of multisets 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, 2, 0, 1, 1, 3, 3, 0, 1, 1, 3, 6, 5, 0, 1, 1, 3, 7, 15, 7, 0, 1, 1, 3, 7, 19, 31, 11, 0, 1, 1, 3, 7, 20, 48, 73, 15, 0, 1, 1, 3, 7, 20, 53, 131, 155, 22, 0, 1, 1, 3, 7, 20, 54, 157, 348, 351, 30, 0, 1, 1, 3, 7, 20, 54, 163, 455, 954, 755, 42, 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,  2,   3,   3,   3,   3,   3,   3, ...
  0,  3,   6,   7,   7,   7,   7,   7, ...
  0,  5,  15,  19,  20,  20,  20,  20, ...
  0,  7,  31,  48,  53,  54,  54,  54, ...
  0, 11,  73, 131, 157, 163, 164, 164, ...
  0, 15, 155, 348, 455, 492, 499, 500, ...
		

Crossrefs

Main diagonal gives A293110.

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:
    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]] < 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];
    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/(1-x^j)^A182172(j,k).
A(n,k) = Sum_{j=0..k} A293109(n,j).
A(n,n) = A(n,k) for all k >= n.

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

A293111 Number of multisets 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, 2, 10, 58, 439, 3767, 37481, 405672, 4816390, 60748286, 817467196, 11533898929, 170979909037, 2635984019533, 42297026556483, 701880878089205, 12045976560853148, 212911592290588547, 3874514946593004395, 72378921228197309169, 1387364840045160600103
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Crossrefs

Formula

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

A293797 Number of multisets 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, 10, 24, 62, 140, 329, 725, 1631, 3548, 7820, 16887, 36767, 79046, 170799, 365883, 786361, 1679486, 3594580, 7656839, 16331933, 34705064, 73810524, 156501393, 332001987, 702530049, 1486995062, 3140712201, 6634309660, 13988510961, 29494808402, 62091823865
Offset: 2

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=2 of A293109.

Formula

a(n) = A293732(n) - A000041(n).

A293798 Number of multisets 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, 17, 58, 193, 603, 1852, 5539, 16391, 47919, 139258, 402365, 1159175, 3330974, 9561080, 27421882, 78642072, 225566206, 647308614, 1858741431, 5341591906, 15363474607, 44228744168, 127444421304, 367573522408, 1061131077602, 3066124030310, 8867379519154
Offset: 3

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=3 of A293109.

Formula

a(n) = A293733(n) - A293732(n).

A293799 Number of multisets 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, 26, 107, 439, 1663, 6283, 22912, 83507, 298936, 1071564, 3804461, 13542785, 47964338, 170456957, 604293910, 2150604057, 7647190962, 27302834888, 97491596984, 349544018586, 1254140950775, 4517792721381, 16291580640312, 58974333255158, 213744923737227
Offset: 4

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=4 of A293109.

Formula

a(n) = A293734(n) - A293733(n).

A293800 Number of multisets 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, 37, 178, 852, 3767, 16576, 70635, 300433, 1260163, 5287178, 22058377, 92181691, 384663989, 1609206870, 6737170404, 28291573975, 119043337521, 502559706310, 2127305239457, 9035671605064, 38494638887783, 164564824326835, 705742561369640, 3036895648331815
Offset: 5

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=5 of A293109.

Formula

a(n) = A293735(n) - A293734(n).

A293801 Number of multisets 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, 50, 275, 1500, 7517, 37481, 180552, 868974, 4120598, 19574576, 92438492, 437977946, 2072100450, 9843499790, 46801485700, 223513049582, 1069698339831, 5142776951972, 24793644707917, 120072824665722, 583316549714731, 2846266161931683, 13933753316683787
Offset: 6

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=6 of A293109.

Formula

a(n) = A293736(n) - A293735(n).

A293802 Number of multisets 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, 65, 402, 2457, 13715, 75997, 405672, 2160487, 11323773, 59410323, 309820614, 1620398321, 8465984310, 44406170067, 233282360743, 1230967142377, 6514406116198, 34634583683433, 184803113451639, 990647642903411, 5331286355111395, 28821503947539335
Offset: 7

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=7 of A293109.

Formula

a(n) = A293737(n) - A293736(n).
Showing 1-10 of 13 results. Next