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.

Previous Showing 11-12 of 12 results.

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

Original entry on oeis.org

0, 0, 4, 60, 374, 1960, 9103, 40497, 174127, 735268, 3064477, 12664101, 52005445, 212595280, 866047122
Offset: 1

Views

Author

R. J. Mathar, Mar 21 2012

Keywords

Comments

See A210109 for further information.
Row sums of the following table which shows how many words of length n over a 4-letter alphabet are 3-divided in k>=1 different ways:
4;
41, 14, 5;
147, 111, 67, 29, 14, 6;
594, 358, 381, 211, 156, 128, 80, 28, 17, 7;
2072, 1400, 1433, 875, 821, 669, 588, 369, 340, 240, 163, 72, 33, 20, 8;
- R. J. Mathar, Mar 25 2012

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("0123", repeat=n))
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Aug 30 2021

Extensions

a(12)-a(15) from Michael S. Branicky, Aug 30 2021

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

Original entry on oeis.org

0, 0, 0, 1, 44, 450, 3175, 17977, 91326, 433434, 1968268, 8674028, 37428470, 159059732
Offset: 1

Views

Author

R. J. Mathar, Mar 21 2012

Keywords

Comments

See A210109 for further information.
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:
1;
38, 4, 2;
253, 104, 66, 15, 3, 8, 0, 1;
1333, 684, 475, 231, 130, 167, 55, 41, 25, 11, 9, 9, 1, 2, 2;
- R. J. Mathar, Mar 25 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("0123", repeat=n))
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Aug 30 2021

Extensions

a(11)-a(14) from Michael S. Branicky, Aug 30 2021
Previous Showing 11-12 of 12 results.