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

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

A293732 Number of multisets of nonempty words with a total of n letters over binary 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, 6, 15, 31, 73, 155, 351, 755, 1673, 3604, 7897, 16988, 36902, 79222, 171030, 366180, 786746, 1679976, 3595207, 7657631, 16332935, 34706319, 73812099, 156503351, 332004423, 702533059, 1486998780, 3140716766, 6634315264, 13988517803, 29494816751
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Crossrefs

Column k=2 of A293108.
Cf. A001405.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(add(binomial(d,
          floor(d/2))*d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..35);
  • Mathematica
    nmax = 40; A001405 = Table[Binomial[n, Floor[n/2]], {n, 1, nmax}]; CoefficientList[Series[Product[1/(1 - x^k)^A001405[[k]], {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, May 30 2019 *)

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A001405(j).
a(n) ~ 2^(n - 1/6) * exp(3*(n/2)^(1/3) - 2 + S) / (sqrt(3*Pi) * n^(5/6)), where S = Sum_{k>=2} (sqrt(1/(1 - 1/2^(2*k - 2))) - 1) * (2^k + 2) / (2*k) = 0.3158684977247920135402311766405977266170498097655... - Vaclav Kotesovec, May 30 2019

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

A293733 Number of multisets of nonempty words with a total of n letters over ternary 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, 19, 48, 131, 348, 954, 2607, 7212, 19995, 55816, 156246, 439267, 1238397, 3502004, 9927260, 28208628, 80322048, 229161413, 654966245, 1875074366, 5376298225, 15437286706, 44385247519, 127776425727, 368276055467, 1062618076382, 3069264747076
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Crossrefs

Column k=3 of A293108.
Cf. A001006.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n<2, 1,
          g(n-1)+add(g(k)*g(n-k-2), k=0..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..35);
  • Mathematica
    g[n_] := g[n] = If[n<2, 1, g[n-1] + Sum[g[k]*g[n-k-2], {k, 0, 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, 35}] (* Jean-François Alcover, May 30 2019, after Alois P. Heinz *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import divisors
    @cacheit
    def g(n): return 1 if n<2 else g(n - 1) + sum([g(k)*g(n - k - 2) for k in range(n - 1)])
    @cacheit
    def a(n): return 1 if n==0 else sum([sum([g(d)*d for d in divisors(j)])*a(n - j) for j in range(1, n + 1)])//n
    print(map(a, range(36))) # Indranil Ghosh, Oct 15 2017

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A001006(j).
a(n) ~ c * 3^n / n^(3/2), where c = 11.84175157992103588081767200532703865225243959779980786519467770732598276486... - Vaclav Kotesovec, May 30 2019
Showing 1-10 of 12 results. Next