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.

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