login
A210324
Number of 3-divided words of length n over a 3-letter alphabet.
3
0, 0, 1, 16, 78, 324, 1141, 3885, 12630, 40315, 126604, 393986, 1216525, 3737912, 11438230, 34898189, 106217986, 322683051
OFFSET
1,4
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
Computed by David Scambler, Mar 19 2012
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, Mar 20 2012
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
STATUS
approved