The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A210321 Number of 4-divided binary words of length n. 2

%I #14 Aug 28 2021 03:19:11

%S 0,0,0,0,0,1,11,37,109,287,698,1617,3642,7985,17208,36620,77093,

%T 161027,334205,690080,1418917,2907655,5941148,12110674

%N Number of 4-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 is4div(b):

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

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

%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(is4div("".join(b)) for b in product("01", repeat=n))

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

%Y Cf. A210109, A210322.

%K nonn,more

%O 1,7

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

%E a(18)-a(24) 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 May 16 20:35 EDT 2024. Contains 372555 sequences. (Running on oeis4.)