login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A210326 Number of 5-divided words of length n over a 3-letter alphabet. 3

%I #21 Aug 28 2021 12:45:53

%S 0,0,0,0,0,0,15,166,1135,5865,26170,105224,396082,1419981,4916112

%N Number of 5-divided words of length n over a 3-letter alphabet.

%C See A210109 for further information.

%C 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:

%C 15;

%C 103,43,20;

%C 546,236,162,84,28,51,16,8,5;

%C 2118,1211,848,480,...

%C - _R. J. Mathar_, Mar 25 2012

%D Computed by David Scambler, Mar 19 2012

%o (Python)

%o from itertools import product, combinations, permutations

%o def is5div(b):

%o for i, j, k, l in combinations(range(1, len(b)), 4):

%o divisions = [b[:i], b[i:j], b[j:k], b[k:l], b[l:]]

%o all_greater = True

%o for p, bp in enumerate(permutations(divisions)):

%o if p == 0: continue

%o if b >= "".join(bp): all_greater = False; break

%o if all_greater: return True

%o return False

%o def a(n): return sum(is5div("".join(b)) for b in product("012", repeat=n))

%o print([a(n) for n in range(1, 10)]) # _Michael S. Branicky_, Aug 28 2021

%Y Cf. A210109, A210324, A210325.

%K nonn,more

%O 1,7

%A _N. J. A. Sloane_, Mar 20 2012

%E a(14)-a(15) from _Michael S. Branicky_, Aug 28 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)