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.

A318796 Number of 2n-length words w over an n-ary alphabet {a1, a2, ..., an} such that #(w,a1) >= #(w,a2) >= ... >= #(w,an) >= 1, where #(w,x) counts the letters x in word w.

Original entry on oeis.org

1, 1, 10, 180, 6496, 322560, 25098480, 2437475040, 322951749120, 51882551360640, 10494386800934400, 2503138912988313600, 720738068391525381120, 239324670990042333696000, 92995858936970165240064000, 41062460981196018797072640000, 20742554869763399771711348736000
Offset: 0

Views

Author

Alois P. Heinz, Sep 03 2018

Keywords

Examples

			a(2) = 10: aaab, aaba, aabb, abaa, abab, abba, baaa, baab, baba, bbaa.
		

Crossrefs

Cf. A226874.

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-> `if`(n=0, 1, (2*n)!*b(2*n, 1, n)):
    seq(a(n), n=0..20);
  • 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_] := If[n == 0, 1, (2n)! b[2n, 1, n]];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 05 2022, after Alois P. Heinz *)

Formula

a(n) = A226874(2n,n).