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.

A226873 Number A(n,k) of n-length words w over a k-ary alphabet {a1,a2,...,ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 0, where #(w,x) counts the letters x in word w; 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, 3, 1, 0, 1, 1, 3, 4, 1, 0, 1, 1, 3, 10, 11, 1, 0, 1, 1, 3, 10, 23, 16, 1, 0, 1, 1, 3, 10, 47, 66, 42, 1, 0, 1, 1, 3, 10, 47, 126, 222, 64, 1, 0, 1, 1, 3, 10, 47, 246, 522, 561, 163, 1, 0, 1, 1, 3, 10, 47, 246, 882, 1821, 1647, 256, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Examples

			A(4,3) = 23: aaaa, aaab, aaba, aabb, aabc, aacb, abaa, abab, abac, abba, abca, acab, acba, baaa, baab, baac, baba, baca, bbaa, bcaa, caab, caba, cbaa.
Square array A(n,k) begins:
  1, 1,  1,   1,    1,    1,    1,     1, ...
  0, 1,  1,   1,    1,    1,    1,     1, ...
  0, 1,  3,   3,    3,    3,    3,     3, ...
  0, 1,  4,  10,   10,   10,   10,    10, ...
  0, 1, 11,  23,   47,   47,   47,    47, ...
  0, 1, 16,  66,  126,  246,  246,   246, ...
  0, 1, 42, 222,  522,  882, 1602,  1602, ...
  0, 1, 64, 561, 1821, 3921, 6441, 11481, ...
		

Crossrefs

Main diagonal gives: A005651.

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    A:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), n!*b(n, 0, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n-j, j, t-1]/j!, {j, i, n/t}]]; a[n_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *)

Formula

A(n,k) = Sum_{i=0..min(n,k)} A226874(n,i).

A226875 Number of n-length words w over a 5-ary alphabet {a1,a2,...,a5} such that #(w,a1) >= #(w,a2) >= ... >= #(w,a5) >= 0, where #(w,x) counts the letters x in word w.

Original entry on oeis.org

1, 1, 3, 10, 47, 246, 882, 3921, 18223, 84790, 432518, 1863951, 8892842, 42656147, 204204353, 1025014815, 4728033983, 22948258742, 111605089014, 541696830843, 2708218059022, 12861557284425, 62938669549583, 308273057334413, 1508708926286914, 7533652902408071
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Crossrefs

Column k=5 of A226873.

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    a:= n-> n!*b(n, 0, 5):
    seq(a(n), n=0..30);
  • Mathematica
    Table[Sum[Sum[Sum[Sum[Sum[If[i+j+k+l+m==n,n!/i!/j!/k!/l!/m!,0],{m,0,l}],{l,0,k}],{k,0,j}],{j,0,i}],{i,0,n}],{n,0,20}] (* Vaclav Kotesovec, Jul 01 2013 *)
    CoefficientList[Series[(HypergeometricPFQ[{},{},x]^5 + 10*HypergeometricPFQ[{},{},x]^3*HypergeometricPFQ[{},{1},x^2] + 20*HypergeometricPFQ[{},{},x]^2*HypergeometricPFQ[{},{1,1},x^3] + 20*HypergeometricPFQ[{},{1},x^2]*HypergeometricPFQ[{},{1,1},x^3] + 15*HypergeometricPFQ[{},{1},x^2]^2*HypergeometricPFQ[{},{},x] + 30*HypergeometricPFQ[{},{1,1,1},x^4]*HypergeometricPFQ[{},{},x] + 24*HypergeometricPFQ[{},{1,1,1,1},x^5])/5!,{x,0,20}],x]*Range[0,20]! (* more efficient, Vaclav Kotesovec, Jul 01 2013 *)

Formula

Conjecture: a(n) ~ 5^n/5!. - Vaclav Kotesovec, Mar 07 2014

A292719 Number of multisets of nonempty words with a total of n letters over quaternary alphabet such that within each word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.

Original entry on oeis.org

1, 1, 4, 14, 67, 223, 951, 3680, 16239, 61656, 260490, 1035820, 4451494, 17534372, 73518595, 295928531, 1253898892, 5015867442, 20920480946, 84742519783, 355861723649, 1434993799839, 5962065435072, 24234396539097, 101149561260620, 409761023233915
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Crossrefs

Column k=4 of A292712.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(t=1, 1/n!,
          add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    a:= proc(n) option remember; `if`(n=0, 1, add(add(d*d!*
          b(d, 0, 4), 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)^A092429(j).
Euler transform of A092429.

A340411 Number of sets of nonempty words with a total of n letters over quaternary alphabet such that within each word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.

Original entry on oeis.org

1, 1, 3, 13, 60, 206, 865, 3408, 15025, 57175, 240741, 961035, 4132903, 16279273, 68134510, 274714351, 1164578487, 4657730815, 19404869767, 78676610521, 330495175277, 1332463920931, 5531856232294, 22498784991153, 93925698566719, 380437352382876
Offset: 0

Views

Author

Alois P. Heinz, Jan 06 2021

Keywords

Crossrefs

Column k=4 of A292795.
Cf. A092429.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(t=1, 1/n!,
          add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    g:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), n!*b(n, 0, k)):
    h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(h(n-i*j, i-1, k)*binomial(g(i, k), j), j=0..n/i)))
        end:
    a:= n-> h(n$2, min(n, 4)):
    seq(a(n), n=0..32);

Formula

G.f.: Product_{j>=1} (1+x^j)^A092429(j).
Showing 1-4 of 4 results.