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

A292723 Number of multisets of nonempty words with a total of n letters over 8-ary 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, 343, 2151, 14900, 119259, 692640, 4659774, 30077836, 209311030, 1433872892, 10689029713, 76772260527, 600293120366, 4142024767610, 30775147154084, 221566161988587, 1663421685691847, 12221938274124959, 93706886872251562, 696726353909296853
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Crossrefs

Column k=8 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, 8), 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)^A226878(j).
Euler transform of A226878.

A340415 Number of sets of nonempty words with a total of n letters over octonary 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, 326, 2065, 14508, 116845, 676579, 4533285, 29337447, 204274255, 1401597565, 10464806200, 75242714351, 588938921227, 4060713617519, 30141138974325, 217182619165093, 1630762746458645, 11987353708674543, 91946531392941646, 683807822490949653
Offset: 0

Views

Author

Alois P. Heinz, Jan 06 2021

Keywords

Crossrefs

Column k=8 of A292795.
Cf. A226878.

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, 8)):
    seq(a(n), n=0..32);

Formula

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