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 10 results.

A213276 Number A(n,k) of n-length words w over a k-ary alphabet such that for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 9, 5, 1, 0, 1, 5, 16, 18, 9, 1, 0, 1, 6, 25, 46, 36, 14, 1, 0, 1, 7, 36, 95, 118, 74, 27, 1, 0, 1, 8, 49, 171, 315, 276, 165, 46, 1, 0, 1, 9, 64, 280, 711, 895, 712, 367, 91, 1, 0, 1, 10, 81, 428, 1414, 2506, 2535, 1805, 869, 162, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Jun 08 2012

Keywords

Examples

			A(0,k) = 1: the empty word.
A(n,1) = 1: (a)^n for alphabet {a}.
A(1,k) = k: number of words = size of the alphabet.
A(2,k) = k^2: all words with 2 letters from the alphabet.
A(3,2) = 5: aaa, aab, aba, baa, bbb for alphabet {a,b}.
A(3,3) = 18: aaa, aab, aac, aba, abc, aca, acb, baa, bac, bbb, bbc, bca, bcb, caa, cab, cba, cbb, ccc.
A(4,2) = 9: aaaa, aaab, aaba, aabb, abaa, abab, baaa, baab, bbbb.
A(5,2) = 14: aaaaa, aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, baaaa, baaab, baaba, bbbbb.
Square array A(n,k) begins:
  1, 1,  1,   1,    1,    1,     1,     1, ...
  0, 1,  2,   3,    4,    5,     6,     7, ...
  0, 1,  4,   9,   16,   25,    36,    49, ...
  0, 1,  5,  18,   46,   95,   171,   280, ...
  0, 1,  9,  36,  118,  315,   711,  1414, ...
  0, 1, 14,  74,  276,  895,  2506,  6104, ...
  0, 1, 27, 165,  712, 2535,  8151, 23527, ...
  0, 1, 46, 367, 1805, 7280, 25781, 83916, ...
		

Crossrefs

Programs

  • Maple
    A:= (n, k)-> h(n, k, 0, []):
    h:= proc(n, k, m, l) option remember;
          `if`(n=0 and k=0, b(l), `if`(k=0 or n>0 and n1     then for j from i+1 to nops(l) do
          if l[i]<=l[j] then return false
        elif l[j]>0     then break
          fi od fi; true
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    a[n_, k_] := h[n, k, 0, {}];
    h[n_, k_, m_, l_] := h[n, k, m, l] = If[n == 0 && k === 0, b[l], If[k == 0 || n > 0 && n < m, 0, Sum[h[n-j, k-1, Max[m, j], Join[{j}, l]], {j, Max[1, m], n}] + h[n, k-1, m, Join[{0}, l]]]];
    b[l_] := b[l] = If[Complement[l, {0}] == {}, 1, Sum[If[g[l, i], b[ReplacePart[l, i -> l[[i]]-1]], 0], {i, 1, Length[l]}]];
    g[l_, i_] := Module[{j}, If[l[[i]] < 1, Return[False], If[l[[i]] > 1, For[ j = i+1, j <= Length[l], j++, If[l[[i]] <= l[[j]], Return[False], If[l[[j]] > 0, Break[]]]]]]; True];
    Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 11 2013, translated from Maple *)

Formula

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

A321838 Number of words w of length n such that each letter of the binary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

2, 3, 7, 12, 25, 44, 89, 160, 321, 587, 1175, 2177, 4355, 8150, 16301, 30744, 61489, 116687, 233375, 445093, 890187, 1704793, 3409587, 6552377, 13104755, 25258599, 50517199, 97617059, 195234119, 378098954, 756197909, 1467343304, 2934686609, 5704370759
Offset: 2

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=2 of A257783.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [0, 2, 3][n],
          ((25*n^4-130*n^3-17*n^2+810*n-848)*a(n-1)
           +(2*(50*n^4-485*n^3+1596*n^2-2049*n+820))*a(n-2)
           -(4*(n-4))*(25*n^3-130*n^2+193*n-76)*a(n-3)
           )/((25*n^3-205*n^2+528*n-424)*(n+1)))
        end:
    seq(a(n), n=2..40);

Formula

a(n) ~ 5 * 2^(n - 3/2) / sqrt(Pi*n). - Vaclav Kotesovec, Nov 21 2018

A321839 Number of words w of length n such that each letter of the ternary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

6, 12, 35, 87, 232, 599, 1591, 4202, 11262, 30221, 81834, 222321, 607871, 1668296, 4601369, 12737394, 35401272, 98716505, 276192166, 774988564, 2180739865, 6151939960, 17396648770, 49303165809, 140018238988, 398407130710, 1135670120668, 3242697225865
Offset: 3

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=3 of A257783.

Formula

a(n) ~ 797 * 3^(n - 3/2) / (32 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Nov 21 2018

A321840 Number of words w of length n such that each letter of the quaternary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

24, 60, 210, 609, 1961, 5952, 19255, 60812, 200281, 652011, 2185981, 7283988, 24809651, 84207955, 290756694, 1001820292, 3500030779, 12211804429, 43101225586, 151996648798, 541273095677, 1926487411495, 6914504463171, 24808989286716, 89666142346093
Offset: 4

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=4 of A257783.

A321841 Number of words w of length n such that each letter of the quinary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

120, 360, 1470, 4872, 17649, 60465, 218360, 779649, 2878543, 10662640, 40402105, 154308568, 599106195, 2346709225, 9308176915, 37232621263, 150428771629, 612404221280, 2513790671891, 10388482748377, 43231607141305, 180987402799559, 762252080995334
Offset: 5

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=5 of A257783.

A321842 Number of words w of length n such that each letter of the senary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

720, 2520, 11760, 43848, 176490, 665115, 2630715, 10224492, 41126477, 165441810, 683213215, 2840595291, 12061223560, 51668953199, 225204435800, 990537353423, 4420156777761, 19894290092220, 90640449133488, 416216322774452, 1931286827029792, 9024993532633957
Offset: 6

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=6 of A257783.

A321843 Number of words w of length n such that each letter of the septenary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

5040, 20160, 105840, 438480, 1941390, 7981380, 34199295, 143278023, 618279060, 2662235895, 11732993885, 52051997928, 235469637340, 1076082576890, 5001152965060, 23506245393141, 112121385673903, 540819706031799, 2642597365003695, 13049933076792172
Offset: 7

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=7 of A257783.

A321844 Number of words w of length n such that each letter of the octonary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

40320, 181440, 1058400, 4823280, 23296680, 103757940, 478790130, 2149170345, 9894491985, 45282147720, 211500002835, 991730832582, 4733756233145, 22787184211575, 111475945291060, 551049677448403, 2764601557859302, 14023910986706605, 72114359742608090
Offset: 8

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=8 of A257783.

A321845 Number of words w of length n such that each letter of the nonary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

362880, 1814400, 11642400, 57879360, 302856840, 1452611160, 7181851950, 34386725520, 168206363745, 815113118385, 4018968988380, 19841370665865, 99477246363495, 502000638243720, 2569888903846460, 13275926076237132, 69519580918458790, 367795800026341605
Offset: 9

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=9 of A257783.

A321846 Number of words w of length n such that each letter of the denary alphabet is used at least once and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.

Original entry on oeis.org

3628800, 19958400, 139708800, 752431680, 4239995760, 21789167400, 114909631200, 584574333840, 3027714547410, 15487149249315, 80380034496675, 416678817402540, 2188661321134365, 11547842522164410, 61697603618819175, 332093455309359975, 1809348373235738090
Offset: 10

Views

Author

Alois P. Heinz, Nov 19 2018

Keywords

Crossrefs

Column k=10 of A257783.
Showing 1-10 of 10 results.