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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A237500 Number of binary strings of length 2n which contain the ones' complement of each of their two halves. 3
 2, 6, 12, 28, 58, 118, 244, 500, 1004, 2024, 4070, 8150, 16340, 32720, 65450, 130986, 262056, 524136, 1048422, 2096982, 4194000, 8388300, 16776906 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Table of n, a(n) for n=1..23. Michael S. Branicky, Python program EXAMPLE The two halves of 011001 are 011 and 001. Their complements are 100 and 110, and both are substrings of 011001. Since there are 11 other strings of length 2*3 with this property, a(3) = 12. MATHEMATICA sQ[L_, {s__}] := MatchQ[L, {___, s, ___}]; a[n_] := Length@ Select[ Tuples[{0, 1}, 2@n], sQ[#, 1-Take[#, n]] && sQ[#, 1-Take[#, -n]] &]; Array[a, 8] PROG (Python) # see link for faster version from itertools import product as prod def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z}) def ok(s): return comp(s[:len(s)//2]) in s and comp(s[len(s)//2:]) in s def a(n): return 2*sum(ok("0"+"".join(p)) for p in prod("01", repeat=2*n-1)) print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Feb 06 2021 CROSSREFS Cf. A237501, A237502. Sequence in context: A089820 A122746 A191394 * A330455 A183467 A057582 Adjacent sequences: A237497 A237498 A237499 * A237501 A237502 A237503 KEYWORD nonn,more AUTHOR Giovanni Resta, Feb 08 2014 EXTENSIONS a(17)-a(21) from Michael S. Branicky, Feb 06 2021 a(22) from Michael S. Branicky, Jul 06 2022 a(23) from Michael S. Branicky, Jul 25 2022 STATUS approved

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.

Last modified June 9 17:56 EDT 2023. Contains 363183 sequences. (Running on oeis4.)