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-10 of 12 results. Next

A292795 Number A(n,k) of sets of nonempty words with a total of n letters over k-ary alphabet such that within each word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; 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, 2, 0, 1, 1, 3, 7, 2, 0, 1, 1, 3, 13, 18, 3, 0, 1, 1, 3, 13, 36, 42, 4, 0, 1, 1, 3, 13, 60, 122, 110, 5, 0, 1, 1, 3, 13, 60, 206, 433, 250, 6, 0, 1, 1, 3, 13, 60, 326, 865, 1356, 627, 8, 0, 1, 1, 3, 13, 60, 326, 1345, 3408, 4449, 1439, 10, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 23 2017

Keywords

Examples

			A(2,3) = 3: {aa}, {ab}, {ba}.
A(3,2) = 7: {aaa}, {aab}, {aba}, {baa}, {aa,a}, {ab,a}, {ba,a}.
A(3,3) = 13: {aaa}, {aab}, {aba}, {baa}, {abc}, {acb}, {bac}, {bca}, {cab}, {cba}, {aa,a}, {ab,a}, {ba,a}.
Square array A(n,k) begins:
  1, 1,   1,    1,     1,     1,     1,     1,      1, ...
  0, 1,   1,    1,     1,     1,     1,     1,      1, ...
  0, 1,   3,    3,     3,     3,     3,     3,      3, ...
  0, 2,   7,   13,    13,    13,    13,    13,     13, ...
  0, 2,  18,   36,    60,    60,    60,    60,     60, ...
  0, 3,  42,  122,   206,   326,   326,   326,    326, ...
  0, 4, 110,  433,   865,  1345,  2065,  2065,   2065, ...
  0, 5, 250, 1356,  3408,  6228,  9468, 14508,  14508, ...
  0, 6, 627, 4449, 15025, 29845, 51325, 76525, 116845, ...
		

Crossrefs

Rows n=0-1 give: A000012, A057427.
Main diagonal gives A292796.

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, k)-> h(n$2, min(n, 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}]];
    g[n_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]];
    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[g[i, k], j], {j, 0, n/i}]]];
    A[n_, k_] := h[n, n, Min[n, k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten(* Jean-François Alcover, Jan 02 2021, after Alois P. Heinz *)

Formula

G.f. of column k: Product_{j>=1} (1+x^j)^A226873(j,k).
A(n,k) = Sum_{j=0..n} A319498(n,j).

A292713 Number of multisets of nonempty words with a total of n letters over n-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, 1055520, 10465854, 113479756, 1350508150, 17373376892, 241576630993, 3596468789967, 57232276979726, 967517444008250, 17339617861447844, 328037083000497867, 6537494747743375847, 136820214583596515519
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Examples

			a(0) = 1: {}.
a(1) = 1: {a}.
a(2) = 4: {aa}, {ab}, {ba}, {a,a}.
a(3) = 14: {aaa}, {aab}, {aba}, {baa}, {abc}, {acb}, {bac}, {bca}, {cab}, {cba}, {aa,a}, {ab,a}, {ba,a}, {a,a,a}.
		

Crossrefs

Main diagonal of A292712.
Row sums of A319495.

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)):
    A:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*
          g(d, k), d=numtheory[divisors](j))*A(n-j, k), j=1..n)/n)
        end:
    a:= n-> A(n$2):
    seq(a(n), n=0..25);
  • 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}]];
    g[n_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]];
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[d*g[d, k], {d, Divisors[j]}]* A[n - j, k], {j, 1, n}]/n];
    a[n_] := A[n, n];
    a /@ Range[0, 25] (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)

Formula

a(n) = [x^n] Product_{j=1..n} 1/(1-x^j)^A226873(j,n).
a(n) = A292712(n,n).
a(n) ~ c * n!, where c = A247551 = 2.5294774720791526... - Vaclav Kotesovec, Oct 05 2017

A319495 Number T(n,k) of multisets of nonempty words with a total of n letters over k-ary alphabet such that for k>0 the k-th letter occurs at least once and within each word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 3, 5, 6, 0, 5, 20, 18, 24, 0, 7, 46, 86, 84, 120, 0, 11, 137, 347, 456, 480, 720, 0, 15, 313, 1216, 2136, 2940, 3240, 5040, 0, 22, 836, 4253, 11128, 15300, 22200, 25200, 40320, 0, 30, 1908, 15410, 44308, 90024, 127680, 191520, 221760, 362880
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2018

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k <= n. T(n,k) = 0 for k > n.

Examples

			T(3,1) = 3: {aaa}, {aa,a}, {a,a,a}.
T(3,2) = 5: {aab}, {aba}, {baa}, {ab,a}, {ba,a}.
T(3,3) = 6: {abc}, {acb}, {bac}, {bca}, {cab}, {cba}.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  2,   2;
  0,  3,   5,    6;
  0,  5,  20,   18,    24;
  0,  7,  46,   86,    84,   120;
  0, 11, 137,  347,   456,   480,   720;
  0, 15, 313, 1216,  2136,  2940,  3240,  5040;
  0, 22, 836, 4253, 11128, 15300, 22200, 25200, 40320;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A000041 (for n>0).
Row sums give A292713.
Main diagonal gives A000142.
First lower diagonal gives A038720.

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)):
    A:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*
          g(d, k), d=numtheory[divisors](j))*A(n-j, k), j=1..n)/n)
        end:
    T:= (n, k)-> A(n, k) -`if`(k=0, 0, A(n, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • 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}]];
    g[n_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]];
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[d*
         g[d, k], {d, Divisors[j]}]*A[n - j, k], {j, 1, n}]/n];
    T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 09 2021, after Alois P. Heinz *)

Formula

T(n,k) = A292712(n,k) - A292712(n,k-1) for k > 0, T(n,0) = A000007(n).

A292548 Number of multisets of nonempty binary words with a total of n letters such that no word has a majority of 0's.

Original entry on oeis.org

1, 1, 4, 8, 25, 53, 148, 328, 858, 1938, 4862, 11066, 27042, 61662, 147774, 336854, 795678, 1810466, 4228330, 9597694, 22211897, 50279985, 115489274, 260686018, 594986149, 1339215285, 3040004744, 6823594396, 15416270130, 34510814918, 77644149076, 173368564396
Offset: 0

Views

Author

Alois P. Heinz, Sep 18 2017

Keywords

Examples

			a(0) = 1: {}.
a(1) = 1: {1}.
a(2) = 4: {01}, {10}, {11}, {1,1}.
a(3) = 8: {011}, {101}, {110}, {111}, {1,01}, {1,10}, {1,11}, {1,1,1}.
		

Crossrefs

Row sums of A292506.
Column k=2 of A292712.
Cf. A027306.

Programs

  • Maple
    g:= n-> 2^(n-1)+`if`(n::odd, 0, binomial(n, n/2)/2):
    a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
          g(d), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..35);
  • Mathematica
    g[n_] :=  2^(n-1) + If[OddQ[n], 0, Binomial[n, n/2]/2];
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*
         g[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Apr 30 2022, after Alois P. Heinz *)

Formula

G.f.: Product_{j>=1} 1/(1-x^j)^A027306(j).
Euler transform of A027306.

A292718 Number of multisets of nonempty words with a total of n letters over ternary 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, 43, 139, 495, 1544, 5111, 17348, 55520, 181946, 607300, 1951262, 6362769, 20972812, 67451405, 218884282, 715353298, 2298626230, 7429125757, 24124615697, 77400570114, 249285637563, 805472940377, 2579640351769, 8283108375403, 26655874638762
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Crossrefs

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

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.

A292720 Number of multisets of nonempty words with a total of n letters over 5-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, 1431, 6620, 31539, 151680, 769374, 3586756, 17500630, 85727012, 420986605, 2116435479, 10254063794, 50697425138, 251055167912, 1244053731675, 6246442090103, 30737278735067, 152890117563022, 761050222982081, 3790169351183134
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Crossrefs

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

A292721 Number of multisets of nonempty words with a total of n letters over 6-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, 9860, 53739, 279360, 1595454, 8733436, 53035750, 280946972, 1626421033, 9103196607, 53266673126, 300953629850, 1817236258604, 10114067087883, 59666856128423, 342703064143223, 2024687556279346, 11644875879288821, 70172335165701018
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Crossrefs

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

A292722 Number of multisets of nonempty words with a total of n letters over 7-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, 78939, 470880, 2805054, 17296396, 110869750, 716116412, 4868928433, 30169477167, 196213489166, 1272224938490, 8371053970724, 55530391931787, 369148740629927, 2514270810574079, 16452249276575722, 109991261928916853
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Crossrefs

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

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.
Showing 1-10 of 12 results. Next