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.

A257740 Number T(n,k) of multisets of nonempty words with a total of n letters over k-ary alphabet such that all k letters occur at least once in the multiset; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 3, 0, 3, 14, 13, 0, 5, 49, 114, 73, 0, 7, 148, 672, 1028, 501, 0, 11, 427, 3334, 9182, 10310, 4051, 0, 15, 1170, 15030, 66584, 129485, 114402, 37633, 0, 22, 3150, 63978, 428653, 1285815, 1918083, 1394414, 394353, 0, 30, 8288, 261880, 2557972, 11117600, 24917060, 30044014, 18536744, 4596553
Offset: 0

Views

Author

Alois P. Heinz, May 06 2015

Keywords

Comments

Row n is the inverse binomial transform of the n-th row of array A144074, which has the Euler transform of the powers of k in column k.

Examples

			T(2,2) = 3: {ab}, {ba}, {a,b}.
T(3,2) = 14: {aab}, {aba}, {abb}, {baa}, {bab}, {bba}, {a,ab}, {a,ba}, {a,bb}, {aa,b}, {ab,b}, {b,ba}, {a,a,b}, {a,b,b}.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  2,    3;
  0,  3,   14,    13;
  0,  5,   49,   114,     73;
  0,  7,  148,   672,   1028,     501;
  0, 11,  427,  3334,   9182,   10310,    4051;
  0, 15, 1170, 15030,  66584,  129485,  114402,   37633;
  0, 22, 3150, 63978, 428653, 1285815, 1918083, 1394414, 394353;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000041 (for n>0), A261043, A320213, A320214, A320215, A320216, A320217, A320218, A320219, A320220.
Row sums give A257741.
Main diagonal gives A000262.
T(2n,n) gives A257742.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(add(
          d*k^d, d=numtheory[divisors](j)) *A(n-j, k), j=1..n)/n)
        end:
    T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • 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}]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 23 2017, adapted from Maple *)

Formula

T(n,k) = Sum_{i=0..k} (-1)^i * C(k,i) * A144074(n,k-i).

Extensions

Name changed by Alois P. Heinz, Sep 21 2018

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

Original entry on oeis.org

1, 1, 4, 27, 218, 2178, 25529, 343392, 5205948, 87740878, 1626182463, 32852520594, 718169744206, 16883948532684, 424649281630018, 11374387591643065, 323183885622356184, 9706973096869527210, 307248234238900686688, 10220414166250239718518
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2018

Keywords

Examples

			a(0) = 1: {}.
a(1) = 1: {a}.
a(2) = 4: {aa}, {ab}, {ba}, {a,b}.
a(3) = 27: {aaa}, {aab}, {aba}, {abb}, {abc}, {acb}, {baa}, {bab}, {bac}, {bba}, {bca}, {cab}, {cba}, {a,aa}, {a,ab}, {a,ba}, {a,bb}, {a,bc}, {a,cb}, {aa,b}, {ab,b}, {ab,c}, {ac,b}, {b,ba}, {b,ca}, {ba,c}, {a,b,c}.
		

Crossrefs

Row sums of A319501.
Cf. A257741.

Programs

  • Maple
    h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(h(n-i*j, i-1, k)*binomial(k^i, j), j=0..n/i)))
        end:
    a:= n-> add(add((-1)^i*binomial(k, i)*h(n$2, k-i), i=0..k), k=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    h[n_, i_, k_] := h[n, i, k] = If[n == 0, 1, If[i < 1, 0,
         Sum[h[n - i*j, i - 1, k]*Binomial[k^i, j], {j, 0, n/i}]]];
    a[n_] := Sum[Sum[(-1)^i*Binomial[k, i]*h[n, n, k-i], {i, 0, k}], {k, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 10 2022, after Alois P. Heinz *)

A320265 Number of proper 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, 3, 23, 178, 1786, 20927, 282520, 4299263, 72750927, 1353700567, 27452623890, 602326265519, 14209892886819, 358576428141962, 9634718410829852, 274567642777650028, 8270000441627265937, 262464788618069324640, 8752908129221863491691, 305968679117675345995513
Offset: 2

Views

Author

Alois P. Heinz, Oct 08 2018

Keywords

Examples

			a(2) = 1: {a,a}.
a(3) = 3: {a,a,a}, {a,a,b}, {a,b,b}.
a(4) = 23: {a,a,a,a}, {a,a,aa}, {aa, aa}, {a,a,a,b}, {a,a,b,b}, {a,b,b,b}, {a,a,ab}, {a,a,ba}, {a,a,bb}, {b,b,ab}, {b,b,ba}, {b,b,aa}, {ab,ab}, {ba,ba}, {a,a,b,c}, {a,a,bc}, {a,a,cb}, {b,b,a,c}, {b,b,ac}, {b,b,ca}, {c,c,a,b}, {c,c,ab}, {c,c,ba}.
		

Crossrefs

Row sums of A320264.

Programs

  • Maple
    h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(h(n-i*j, i-1, k)*binomial(k^i, j), j=0..n/i)))
        end:
    g:= proc(n, k) option remember; `if`(n=0, 1, add(add(
          d*k^d, d=numtheory[divisors](j))*g(n-j, k), j=1..n)/n)
        end:
    a:= n-> add(add((-1)^i*(g(n, k-i)-h(n$2, k-i))*
            binomial(k, i), i=0..k), k=1..n-1):
    seq(a(n), n=2..25);
  • Mathematica
    h[n_, i_, k_] := h[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[h[n - i*j, i - 1, k]*Binomial[k^i, j], {j, 0, n/i}]]];
    g[n_, k_] := g[n, k] = If[n == 0, 1, Sum[Sum[d*k^d, {d, Divisors[j]}]*g[n - j, k], {j, 1, n}]/n];
    T[n_, k_] := Sum[(-1)^i*(g[n, k-i]-h[n, n, k-i])*Binomial[k, i], {i, 0, k}];
    a[n_] := Sum[T[n, k], {k, 1, n - 1}];
    Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Jun 01 2022, after Alois P. Heinz in A320264 *)

Formula

a(n) = Sum_{k=1..n-1} A320264(n,k).
a(n) = A257741(n) - A319518(n).
Showing 1-3 of 3 results.