A210324 Number of 3-divided words of length n over a 3-letter alphabet.
0, 0, 1, 16, 78, 324, 1141, 3885, 12630, 40315, 126604, 393986, 1216525, 3737912, 11438230, 34898189, 106217986, 322683051
Offset: 1
References
- Computed by David Scambler, Mar 19 2012
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
Comments