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

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

A209970 a(n) = 2^n - A000031(n).

Original entry on oeis.org

0, 0, 1, 4, 10, 24, 50, 108, 220, 452, 916, 1860, 3744, 7560, 15202, 30576, 61420, 123360, 247542, 496692, 996088, 1997272, 4003558, 8023884, 16077964, 32212248, 64527436, 129246660, 258847876, 518358120, 1037949256, 2078209980, 4160747500, 8329633416, 16674575056, 33378031536
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Mar 17 2012

Keywords

Comments

a(n) is also the number of 2-divided binary words of length n (see A210109 for definition, see A209919 for further details).
This is a special case of a more general result: Let A={0,1,...,s-1} be an alphabet of size s. Let A* = set of words over A. Let < denote lexicographic order on A*. Let f be the morphism on A* defined by i -> s-i for i in A.
Theorem: Let d(n) be the number of 2-divided words in A* of length n, and let b(n) be the number of rotationally inequivalent necklaces with n beads each in A. Then d(n)+b(n)=s^n.
Proof: Let w in A* have length n. If w is <= all of its cyclic shifts then w contributes to the b(n) count. Otherwise w = uv with vu < uv. But then f(w)=f(u)f(v) with f(u)f(v) < f(v)f(u) is 2-divided, and w contributes to the count in d(n). QED
Cor.: A000031(n) + A209970(n) = 2^n, A001867(n) + A210323(n) = 3^n, A001868(n) + A210424(n) = 4^n.

Crossrefs

A209919 Triangle read by rows: T(n,k), 0 <= k <= n-1, = number of 2-divided binary sequences of length n which are 2-divisible in exactly k ways.

Original entry on oeis.org

0, 3, 1, 4, 2, 2, 6, 3, 4, 3, 8, 6, 6, 6, 6, 14, 9, 11, 10, 11, 9, 20, 18, 18, 18, 18, 18, 18, 36, 30, 33, 30, 34, 30, 33, 30, 60, 56, 56, 58, 56, 56, 58, 56, 56, 108, 99, 105, 99, 105, 100, 105, 99, 105, 99, 188, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 352, 335, 344, 338, 346, 335, 348, 335, 346, 338, 344, 335, 632, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 1182, 1161, 1179, 1161, 1179, 1161, 1179, 1162, 1179, 1161, 1179, 1161, 1179, 1161, 2192, 2182, 2182, 2188, 2182, 2184, 2188, 2182, 2182, 2188, 2184, 2182, 2188, 2182, 2182
Offset: 1

Views

Author

N. J. A. Sloane, Mar 21 2012

Keywords

Comments

Computed by David Scambler.
See A210109 for further information.
Omitting the leading column, triangle has mirror symmetry.
Speculation: T(2n+1,2)=T(2n+1,1); T(2n,2)=T(2n,1)+T(n,1); T(3n+1,3)=T(3n+1,1); T(3n+2,3)=T(3n+2,1); T(3n,3)=T(3n,1)+T(n,1) and similar "lagged modulo sums" for T(4n+i,4)=T(4n+i,2), 0R. J. Mathar, Mar 27 2012
Right border appears to be A059966. - Michel Marcus, Apr 26 2013

Examples

			Triangle begins:
n  k=0  k=1  k=2  k=3  k=4  k=5  k=6  k=7  k=8  k=9  k=10 k=11 k=12 k=13 k=14
1  1
2  3    1
3  4    2    2
4  6    3    4    3
5  8    6    6    6    6
6  14   9    11   10   11   9
7  20   18   18   18   18   18   18
8  36   30   33   30   34   30   33   30
9  60   56   56   58   56   56   58   56   56
10 108  99   105  99   105  100  105  99   105  99
11 188  186  186  186  186  186  186  186  186  186  186
12 352  335  344  338  346  335  348  335  346  338  344  335
13 632  630  630  630  630  630  630  630  630  630  630  630  630
14 1182 1161 1179 1161 1179 1161 1179 1162 1179 1161 1179 1161 1179 1161
15 2192 2182 2182 2188 2182 2184 2188 2182 2182 2188 2184 2182 2188 2182 2182...
		

Crossrefs

First column is A000031, second column is conjectured to be A001037. Row sums = 2^n.

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

Original entry on oeis.org

0, 0, 1, 16, 78, 324, 1141, 3885, 12630, 40315, 126604, 393986, 1216525, 3737912, 11438230, 34898189, 106217986, 322683051
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2012

Keywords

Comments

See A210109 for further information.
Row sums of the following irregular triangle which shows how many words of length n over a 3-letter alphabet are 3-divided in k>=1 different ways:
1;
12, 3, 1;
29, 29, 12, 5, 2, 1;
100, 56, 69, 40, 21, 21, 11, 3, 2, 1;
247, 183, 188, 115, 101, 96, 71, 40, 44, 27, 17, 6, 3, 2, 1;
716, 474, 546, 328, 323, 268, 246, 203, 186, 140, 128, 100, 79, 56, 49, 22, 9, 6, 3, 2, 1;
- R. J. Mathar, Mar 25 2012

References

Crossrefs

Programs

  • Python
    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 [X+Z+Y, Z+Y+X, Y+X+Z, Y+Z+X, Z+X+Y]):
                    return True
        return False
    def a(n): return sum(is3div("".join(b)) for b in product("012", repeat=n))
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Aug 28 2021

Extensions

After a typo was corrected, the entries were confirmed by R. J. Mathar, Mar 22 2012
a(14)-a(18) from Michael S. Branicky, Aug 28 2021

A210325 Number of 4-divided words of length n over a 3-letter alphabet.

Original entry on oeis.org

0, 0, 0, 0, 6, 56, 343, 1534, 6067, 22162, 76899, 257792, 843616, 2712241, 8606426, 27040628, 84311895
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2012

Keywords

Comments

See A210109 for further information.
Row sums of the following table which shows how many words of length n over a 3-letter alphabet are 4-divided in k different ways:
6;
34, 13, 9;
159, 75, 51, 20, 13, 17, 5, 3;
500, 287, 266, 130, 71, 103, 37, 35, 33, 22, 15, 14, 13, 2, 3, 1, 2;
- R. J. Mathar, Mar 25 2012

References

  • Computed by David Scambler, Mar 19 2012

Crossrefs

Programs

  • Python
    from itertools import product, combinations, permutations
    def is4div(b):
        for i, j, k in combinations(range(1, len(b)), 3):
            divisions = [b[:i], b[i:j], b[j:k], b[k:]]
            all_greater = True
            for p, bp in enumerate(permutations(divisions)):
                if p == 0: continue
                if b >= "".join(bp): all_greater = False; break
            if all_greater: return True
        return False
    def a(n): return sum(is4div("".join(b)) for b in product("012", repeat=n))
    print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Aug 28 2021

Extensions

a(14)-a(17) from Michael S. Branicky, Aug 28 2021

A210326 Number of 5-divided words of length n over a 3-letter alphabet.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 15, 166, 1135, 5865, 26170, 105224, 396082, 1419981, 4916112
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2012

Keywords

Comments

See A210109 for further information.
Row sums of the following table which shows how many words of length n over a 3-letter alphabet are 5-divided in k>=1 different ways:
15;
103,43,20;
546,236,162,84,28,51,16,8,5;
2118,1211,848,480,...
- R. J. Mathar, Mar 25 2012

References

  • Computed by David Scambler, Mar 19 2012

Crossrefs

Programs

  • Python
    from itertools import product, combinations, permutations
    def is5div(b):
        for i, j, k, l in combinations(range(1, len(b)), 4):
            divisions = [b[:i], b[i:j], b[j:k], b[k:l], b[l:]]
            all_greater = True
            for p, bp in enumerate(permutations(divisions)):
                if p == 0: continue
                if b >= "".join(bp): all_greater = False; break
            if all_greater: return True
        return False
    def a(n): return sum(is5div("".join(b)) for b in product("012", repeat=n))
    print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Aug 28 2021

Extensions

a(14)-a(15) from Michael S. Branicky, Aug 28 2021

A210321 Number of 4-divided binary words of length n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 11, 37, 109, 287, 698, 1617, 3642, 7985, 17208, 36620, 77093, 161027, 334205, 690080, 1418917, 2907655, 5941148, 12110674
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2012

Keywords

Comments

See A210109 for further information.

References

  • Computed by David Scambler, Mar 19 2012

Crossrefs

Programs

  • Python
    from itertools import product, combinations, permutations
    def is4div(b):
        for i, j, k in combinations(range(1, len(b)), 3):
            divisions = [b[:i], b[i:j], b[j:k], b[k:]]
            all_greater = True
            for p, bp in enumerate(permutations(divisions)):
                if p == 0: continue
                if b >= "".join(bp): all_greater = False; break
            if all_greater: return True
        return False
    def a(n): return sum(is4div("".join(b)) for b in product("01", repeat=n))
    print([a(n) for n in range(1, 14)]) # Michael S. Branicky, Aug 27 2021

Extensions

a(18)-a(24) from Michael S. Branicky, Aug 27 2021

A210322 Number of 5-divided binary words of length n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 6, 36, 150, 464, 1304, 3349, 8213, 19230, 43867, 97644, 213776, 461240, 984603, 2082436
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2012

Keywords

Comments

See A210109 for further information.

References

  • Computed by David Scambler, Mar 19 2012

Crossrefs

Programs

  • Python
    from itertools import product, combinations, permutations
    def is5div(b):
        for i, j, k, l in combinations(range(1, len(b)), 4):
            divisions = [b[:i], b[i:j], b[j:k], b[k:l], b[l:]]
            all_greater = True
            for p, bp in enumerate(permutations(divisions)):
                if p == 0: continue
                if b >= "".join(bp): all_greater = False; break
            if all_greater: return True
        return False
    def a(n): return sum(is5div("".join(b)) for b in product("01", repeat=n))
    print([a(n) for n in range(1, 13)]) # Michael S. Branicky, Aug 27 2021

Extensions

a(17)-a(22) 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
Showing 1-10 of 12 results. Next