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!)
A210322 Number of 5-divided binary words of length n. 2

%I #13 Aug 28 2021 03:19:24

%S 0,0,0,0,0,0,0,0,6,36,150,464,1304,3349,8213,19230,43867,97644,213776,

%T 461240,984603,2082436

%N Number of 5-divided binary words of length n.

%C See A210109 for further information.

%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("01", repeat=n))

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

%Y Cf. A210109, A210321.

%K nonn,more

%O 1,9

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

%E a(17)-a(22) from _Michael S. Branicky_, Aug 27 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 18 10:46 EDT 2024. Contains 371779 sequences. (Running on oeis4.)