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.
%I A210426 #18 Aug 30 2021 17:12:26 %S A210426 0,0,0,1,44,450,3175,17977,91326,433434,1968268,8674028,37428470, %T A210426 159059732 %N A210426 Number of 4-divided words of length n over a 4-letter alphabet. %C A210426 See A210109 for further information. %C A210426 Row sums of the following table which shows how many words of length n over a 4-letter alphabet are 4-divided in k>=1 different ways: %C A210426 1; %C A210426 38, 4, 2; %C A210426 253, 104, 66, 15, 3, 8, 0, 1; %C A210426 1333, 684, 475, 231, 130, 167, 55, 41, 25, 11, 9, 9, 1, 2, 2; %C A210426 - _R. J. Mathar_, Mar 25 2012 %o A210426 (Python) %o A210426 from itertools import product, combinations, permutations %o A210426 def is4div(b): %o A210426 for i, j, k in combinations(range(1, len(b)), 3): %o A210426 divisions = [b[:i], b[i:j], b[j:k], b[k:]] %o A210426 all_greater = True %o A210426 for p, bp in enumerate(permutations(divisions)): %o A210426 if p == 0: continue %o A210426 if b >= "".join(bp): all_greater = False; break %o A210426 if all_greater: return True %o A210426 return False %o A210426 def a(n): return sum(is4div("".join(b)) for b in product("0123", repeat=n)) %o A210426 print([a(n) for n in range(1, 9)]) # _Michael S. Branicky_, Aug 30 2021 %Y A210426 Cf. A210109, A210425. %K A210426 nonn %O A210426 1,5 %A A210426 _R. J. Mathar_, Mar 21 2012 %E A210426 a(11)-a(14) from _Michael S. Branicky_, Aug 30 2021