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-4 of 4 results.

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.

A293746 Number of sets 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, 2, 6, 15, 45, 136, 430, 1414, 4835, 17143, 62843, 238245, 930418, 3741710, 15445815, 65384356, 283113205, 1252393193, 5648731817, 25945636702, 121172059749, 574764521186, 2765620022767, 13486540312370, 66587056756662, 332594340605540, 1679325348600290
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2017

Keywords

Crossrefs

Column k=7 of A293112.

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:
    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
    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, 1, 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]]]]]];
    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_] := b[n, n, 7];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 06 2018, using code from A293112 *)

Formula

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

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

A293803 Number of multisets of nonempty words with a total of n letters over octonary alphabet containing the eighth 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, 9, 82, 563, 3807, 23376, 142085, 829038, 4816390, 27477989, 156716051, 887263747, 5034299169, 28513927121, 162089445027, 922536360293, 5273968531519, 30236181831043, 174184141284927, 1007162425272715, 5852489042303046, 34148843838375080, 200241641820235902
Offset: 8

Views

Author

Alois P. Heinz, Oct 16 2017

Keywords

Crossrefs

Column k=8 of A293109.

Formula

a(n) = A293738(n) - A293737(n).
Showing 1-4 of 4 results.