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.

A257741 Number of multisets of nonempty words with a total of n letters over n-ary alphabet such that if a letter occurs in the multiset all predecessors occur at least once.

Original entry on oeis.org

1, 1, 5, 30, 241, 2356, 27315, 364319, 5488468, 92040141, 1698933390, 34206221161, 745622368096, 17486274798203, 438859174516837, 11732964019785027, 332818604033186036, 9981540739647177238, 315518234680527952625, 10482878954868309043158, 365158449014981632341391
Offset: 0

Views

Author

Alois P. Heinz, May 06 2015

Keywords

Examples

			a(0) = 1: {}.
a(1) = 1: {a}.
a(2) = 5: {a,a}, {aa}, {ab}, {ba}, {a,b}.
		

Crossrefs

Programs

  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[DivisorSum[j, #*k^#&]*A[n - j, k], {j, 1, n}]/n];
    T[n_, k_] := Sum[A[n, k - i]*(-1)^i*Binomial[k, i], {i, 0, k}];
    a[n_] := Sum[T[n, k], {k, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 01 2022, after Alois P. Heinz in A257740 *)

Formula

a(n) = Sum_{k=0..n} A257740(n,k).