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-4 of 4 results.

A210109 Number of 3-divided binary sequences (or words) of length n.

Original entry on oeis.org

0, 0, 0, 2, 7, 23, 54, 132, 290, 634, 1342, 2834, 5868, 12140, 24899, 50929, 103735, 210901, 427623, 865910, 1750505, 3535098, 7131321, 14374647, 28952661, 58280123, 117248217, 235770302, 473897980, 952183214, 1912535827, 3840345963, 7709282937, 15472242645, 31045402788, 62280978042
Offset: 1

Views

Author

N. J. A. Sloane, Mar 17 2012

Keywords

Comments

A binary sequence (or word) W of length n is 3-divided if it can be written as a concatenation W = XYZ such that XYZ is strictly earlier in lexicographic order than any of the five permutations XZY, ZYX, YXZ, YZX, ZXY.
More generally, fix an alphabet A = {0,1,2,...,a-1}.
Define lexicographic order on words over A in the obvious way: for single letters, i < j is the natural order; for words U, V, we set U < V iff u_i < v_i at the first place where they differ; also U < UV if V is nonempty, etc.
Then a word U over A is "k-divided over A" if it can be written as U = X_1 X_2 ... X_k in such a way that X is strictly less in lexicographic order than X_pi_1 X_pi_2 ... X_pi_k for all nontrivial permutations pi of [1..k].
All 2^n binary words are 1-divided. For 2-divided words see A209970.
"k-divisible" would sound better to me than "k-divided", but I have followed Lothaire and Pirillo-Varricchio in using the latter term. Neither reference gives this sequence.

Examples

			The two 3-divisible binary words of length 4 and the seven of length 5 are as follows. The periods indicate the division w = x.y.z. For example, 0.01.1 is 3-divided since 0011 < all of 0101, 1010, 0101, 1001, 0110.
0.01.1
0.10.1
0.001.1
0.010.1
0.01.10
0.01.11
0.100.1
0.10.11
0.110.1
		

References

  • M. Lothaire, Combinatorics on words. A collective work by Dominique Perrin, Jean Berstel, Christian Choffrut, Robert Cori, Dominique Foata, Jean Eric Pin, Guiseppe Pirillo, Christophe Reutenauer, Marcel-P. Schützenberger, Jacques Sakarovitch and Imre Simon. With a foreword by Roger Lyndon. Edited and with a preface by Perrin. Encyclopedia of Mathematics and its Applications, 17. Addison-Wesley Publishing Co., Reading, Mass., 1983. xix+238 pp. ISBN: 0-201-13516-7, MR0675953 (84g:05002). See p. 144.

Crossrefs

Number of k-divided words of length n over alphabet of size A:
A=2, k=2,3,4,5: A209970 (and A209919, A000031, A001037), A210109 (and A210145), A210321, A210322;
A=3, k=2,3,4,5: A210323 (and A001867, A027376), A210324, A210325, A210326;
A=4, k=2,3,4: A210424 (and A001868, A027377), A210425, A210426.

Programs

  • Python
    # see link for faster, bit-based version
    from itertools import product
    def is3div(b):
        for i in range(1, len(b)-1):
            for j in range(i+1, len(b)):
                X, Y, Z = b[:i], b[i:j], b[j:]
                if all(b < bp for bp in [Z+Y+X, Z+X+Y, Y+Z+X, Y+X+Z, X+Z+Y]):
                    return True
        return False
    def a(n): return sum(is3div("".join(b)) for b in product("01", repeat=n))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Aug 27 2021

Formula

Is there a formula or recurrence?

Extensions

Values confirmed and a(30)-a(31) by David Applegate, Mar 19 2012
a(32)-a(36) from Michael S. Branicky, Aug 27 2021

A210323 Number of 2-divided words of length n over a 3-letter alphabet.

Original entry on oeis.org

0, 3, 16, 57, 192, 599, 1872, 5727, 17488, 53115, 161040, 487073, 1471680, 4441167, 13392272, 40355877, 121543680, 365895947, 1101089808, 3312442185, 9962240928, 29954639751, 90049997136, 270661616363, 813397065024, 2444101696683, 7343167947040, 22059763982001, 66263812628160
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2012

Keywords

Comments

See A210109 for further information.
It appears that A027376 gives the number of 2-divided words that have a unique division into two parts. - David Scambler, Mar 21 2012
Row sums of the following irregular triangle W(n,k) which shows how many words of length n over a 3-letter alphabet are 2-divided in k>=1 different ways (3-letter analog of A209919):
3;
8, 8;
18, 21, 18;
48, 48, 48, 48;
116, 124, 119, 124, 116;
312, 312, 312, 312, 312, 312;
810, 828, 810, 831, 810, 828, 810;
2184, 2184, 2192, 2184, 2184, 2192, 2184, 2184;
5880, 5928, 5880, 5928, 5883, 5928, 5880, 5928, 5880;
First column of the following triangle D(n,k) which shows how many words of length n over a 3-letter alphabet are k-divided:
3;
16, 1;
57, 16, 0;
192, 78, 6, 0;
599, 324, 56, 0, 0;
1872, 1141, 343, 15, 0, 0;
5727, 3885, 1534, 166, 0, 0, 0;
17488, 12630, 6067, 1135, 20, 0, 0, 0;
53115, 40315, 22162, 5865, 351, 0, 0, 0, 0;
161040, 126604, ...
- R. J. Mathar, Mar 25 2012
Speculation: W(2n+1,2)=W(2n+1,1) and W(2n,2) = W(2n,1)+W(n,1). W(3n+1,3)=W(3n+1,1); W(3n+2,3)=W(3n+1,1); W(3n,3) = W(3n,1)+W(n,1). - R. J. Mathar, Mar 27 2012

Crossrefs

Formula

a(n) = 3^n - A001867(n) (see A209970 for proof).

Extensions

a(1)-a(12) computed by David Scambler, Mar 19 2012; a(13) onwards from N. J. A. Sloane, Mar 20 2012

A210424 Number of 2-divided words of length n over a 4-letter alphabet.

Original entry on oeis.org

0, 0, 6, 40, 186, 816, 3396, 14040, 57306, 233000, 943608, 3813000, 15378716, 61946640, 249260316, 1002158880, 4026527706, 16169288640, 64901712996, 260410648680, 1044535993800, 4188615723280, 16792541033556, 67309233561240, 269746851976156
Offset: 1

Views

Author

N. J. A. Sloane, Mar 21 2012

Keywords

Comments

See A210109 for further information.
It appears that A027377 gives the number of 2-divided words that have a unique division into two parts. - David Scambler, Mar 21 2012
From R. J. Mathar, Mar 25 2012: (Start)
Row sums of the following table which shows how many words of length n over a 4-letter alphabet are 2-divided in k>=1 different ways:
6;
20, 20;
60, 66, 60;
204, 204, 204, 204;
670, 690, 676, 690, 670;
2340, 2340, 2340, 2340, 2340, 2340;
8160, 8220, 8160, 8226, 8160, 8220, 8160;
First column of the following triangle which shows how many words of length n over a 4-letter alphabet are k-divided:
6;
40, 4;
186, 60, 1;
816, 374, 44, 0;
3396, 1960, 450, 12, 0;
14040, 9103, 3175, 275, 0, 0;
57306, 40497, 17977, 2915, 66, 0, 0;
233000, 174127, 91326, 22243, 1318,..
(End)

Crossrefs

Formula

a(n) = 4^n - A001868(n) (see A209970 for proof).

Extensions

a(1)-a(10) computed by R. J. Mathar, Mar 20 2012
a(13) onwards from N. J. A. Sloane, Mar 21 2012

A210145 a(n) = 2^n - A210109(n).

Original entry on oeis.org

2, 4, 8, 14, 25, 41, 74, 124, 222, 390, 706, 1262, 2324, 4244, 7869, 14607, 27337, 51243, 96665, 182666, 346647, 659206, 1257287, 2402569, 4601771, 8828741, 16969511, 32665154, 62972932
Offset: 1

Views

Author

N. J. A. Sloane, Mar 17 2012

Keywords

Comments

This is the number of binary sequences of length n that are not 3-divided. The number that are not 2-divided turned out, surprisingly, to be A000031, so this also seems worth including.

Crossrefs

Showing 1-4 of 4 results.