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 10 results.

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

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.

A293808 Number T(n,k) of multisets 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, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 4, 2, 1, 0, 10, 7, 2, 1, 0, 26, 18, 7, 2, 1, 0, 76, 56, 22, 7, 2, 1, 0, 232, 168, 68, 22, 7, 2, 1, 0, 764, 543, 218, 73, 22, 7, 2, 1, 0, 2620, 1792, 721, 234, 73, 22, 7, 2, 1, 0, 9496, 6187, 2438, 791, 240, 73, 22, 7, 2, 1, 0, 35696, 22088, 8491, 2702, 811, 240, 73, 22, 7, 2, 1
Offset: 0

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Examples

			T(0,0) = 1: {}.
T(3,1) = 4: {aaa}, {aab}, {aba}, {abc}.
T(3,2) = 2: {a,aa}, {a,ab}.
T(3,3) = 1: {a,a,a}.
T(4,2) = 7: {a,aaa}, {a,aab}, {a,aba}, {a,abc}, {aa,aa}, {aa,ab}, {ab,ab}.
Triangle T(n,k) begins:
  1;
  0,    1;
  0,    2,    1;
  0,    4,    2,    1;
  0,   10,    7,    2,   1;
  0,   26,   18,    7,   2,   1;
  0,   76,   56,   22,   7,   2,  1;
  0,  232,  168,   68,  22,   7,  2,  1;
  0,  764,  543,  218,  73,  22,  7,  2, 1;
  0, 2620, 1792,  721, 234,  73, 22,  7, 2, 1;
  0, 9496, 6187, 2438, 791, 240, 73, 22, 7, 2, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000085 (for n>0), A294004, A294005, A294006, A294007, A294008, A294009, A294010, A294011, A294012.
Row sums give: A293110.
T(2n,n) gives A293809.
Cf. 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; expand(`if`(n=0 or i=1, x^n,
          add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(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 || i == 1, x^n, Sum[Binomial[g[i] + j - 1, j]*b[n - i*j, i - 1]*x^j, {j, 0, n/i}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][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/(1-y*x^j)^A000085(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.

A293735 Number of multisets of nonempty words with a total of n letters over quinary 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, 163, 492, 1571, 5122, 17262, 59483, 209958, 755615, 2770994, 10330036, 39103166, 150073289, 583329574, 2293822828, 9116935874, 36593731182, 148221246775, 605427601519, 2492286544749, 10334197803358, 43140208034891, 181224681022614
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Comments

This sequence differs from A293110 first at n=6.

Crossrefs

Column k=5 of A293108.

Programs

  • Maple
    g:= proc(n) option remember;
          `if`(n<3, [1, 1, 2][n+1], ((3*n^2+17*n+15)*g(n-1)
           +(n-1)*(13*n+9)*g(n-2) -15*(n-1)*(n-2)*g(n-3)) /
           ((n+4)*(n+6)))
        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..35);
  • Mathematica
    g[n_] := g[n] = If[n < 3, {1, 1, 2}[[n+1]], ((3n^2+17n+15) g[n-1] + (n-1)(13n+9) g[n-2] - 15(n-1)(n-2) g[n-3]) / ((n+4)(n+6))];
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[g[d] d, {d, Divisors[j]}] a[n-j], {j, 1, n}]/n];
    a /@ Range[0, 35] (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A049401(j).
a(n) ~ c * 5^n / n^5, where c = 542.824729617782144... - Vaclav Kotesovec, May 30 2019

A293736 Number of multisets of nonempty words with a total of n letters over senary 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, 499, 1621, 5397, 18762, 67000, 247439, 936167, 3639968, 14450634, 58677742, 242511781, 1021307520, 4365923278, 18960435664, 83395216882, 371734296357, 1675125941350, 7635063496721, 35127842511275, 163213032700613, 764541230737345
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Comments

This sequence differs from A293110 first at n=7.

Crossrefs

Column k=6 of A293108.

Programs

  • Maple
    g:= proc(n) option remember;
          `if`(n<4, [1, 1, 2, 4][n+1], ((20*n^2+184*n+336)*g(n-1)
           +4*(n-1)*(10*n^2+58*n+33)*g(n-2) -144*(n-1)*(n-2)*g(n-3)
           -144*(n-1)*(n-2)*(n-3)*g(n-4))/ ((n+5)*(n+8)*(n+9)))
        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..35);

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A007579(j).
a(n) ~ c * 6^n / n^(15/2), where c = 121210.8807171702661881473876689430182129891246619701141888082152779... - Vaclav Kotesovec, May 30 2019

A293737 Number of multisets of nonempty words with a total of n letters over septenary 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, 1629, 5462, 19164, 69457, 261154, 1012164, 4045640, 16611121, 70001515, 301922104, 1331128134, 5986321599, 27426419974, 127801386949, 605016657100, 2906093083727, 14149469612919, 69762426194708, 348016146152252, 1755188873640756
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Comments

This sequence differs from A293110 first at n=8.

Crossrefs

Column k=7 of A293108.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n<4, [1, 1, 2, 4][n+1],
          ((4*n^3+78*n^2+424*n+495)*g(n-1) +(n-1)*(34*n^2+280*n+
           305)*g(n-2) -2*(n-1)*(n-2)*(38*n+145)*g(n-3) -105*(n-1)
           *(n-2)*(n-3)*g(n-4))/((n+6)*(n+10)*(n+12)))
        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..35);

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A007578(j).
a(n) ~ c * 7^n / n^(21/2), where c = 233774941.39802934196800791705821024006230754487492494942398064537776753785... - Vaclav Kotesovec, May 30 2019

A293738 Number of multisets of nonempty words with a total of n letters over octonary 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, 5471, 19246, 70020, 264961, 1035540, 4187725, 17440159, 74817905, 329400093, 1487844185, 6873585346, 32460719143, 156315314070, 767106102127, 3828629444020, 19423438144438, 99998608025751, 522200287437179, 2762351298913471
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Comments

This sequence differs from A293110 first at n=9.

Crossrefs

Column k=8 of A293108.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n<4, [1, 1, 2, 4][n+1],
          ((40*n^3+1084*n^2+8684*n+18480)*g(n-1) +16*(n-1)*
          (5*n^3+107*n^2+610*n+600)*g(n-2) -1024*(n-1)*(n-2)*
          (n+6)*g(n-3) -1024*(n-1)*(n-2)*(n-3)*(n+4)*g(n-4))
           /((n+7)*(n+12)*(n+15)*(n+16)))
        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..35);

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A007580(j).
a(n) ~ c * 8^n / n^14, where c = 4485962145436.6348123684794... - Vaclav Kotesovec, Dec 19 2020

A293739 Number of multisets of nonempty words with a total of n letters over nonary 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, 19256, 70121, 265723, 1041184, 4225484, 17689505, 76392933, 339283021, 1548592471, 7246210567, 34725853445, 170096822940, 850715642495, 4337263437693, 22519434992230, 118916581795167, 638088881489144, 3475474084479428
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Comments

This sequence differs from A293110 first at n=10.

Crossrefs

Column k=9 of A293108.

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A212915(j).
a(n) ~ c * 9^n / n^18, where c = 978644175524508179.918397627321774... - Vaclav Kotesovec, Dec 19 2020

A293740 Number of multisets of nonempty words with a total of n letters over denary 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, 70132, 265845, 1042187, 4233556, 17747898, 76808746, 342105748, 1567582938, 7371055703, 35543320641, 175391546006, 884988267329, 4558168670317, 23945579145172, 128119583103268, 697657759802893, 3861749505389798
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Comments

This sequence differs from A293110 first at n=11.
In general, for k>2, is column k of A293108 asymptotic to c(k) * k^n / n^(k*(k-1)/4), where c(k) are constants dependent only on k. - Vaclav Kotesovec, Dec 19 2020

Crossrefs

Column k=10 of A293108.

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A212916(j).
a(n) ~ c * 10^n / n^(45/2), where c = 2738042932059662927432072.80048573... - Vaclav Kotesovec, Dec 19 2020
Showing 1-10 of 10 results.