Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #26 Jan 01 2021 03:20:56
%S 0,2,6,16,34,80,164,368,754,1640,3312,7064,14312,30088,60612,126104,
%T 253918,524104,1053564,2161376,4341072,8863048,17786736,36176784,
%U 72556592,147125256,294927876,596566200,1195391736,2413163552,4833869604,9742379496,19509908190,39268751168,78621406744,158073043176
%N Sum of the lengths of LB factorizations over all binary strings of length n.
%C A border of a string w is a nonempty proper prefix of w that is also a suffix. The LB ("longest border") factorization of a string w is as follows: if w has no border, then the factorization is just (w). Otherwise, write w = (x)(w')(x) where x is the longest border of length <= |w|/2, and continue with w'. The length of the factorization is the number of factors. For example, 0101101010 = (010)(1)(10)(1)(010), and so has length 5.
%H Michael S. Branicky, <a href="/A330884/b330884.txt">Table of n, a(n) for n = 0..41</a>
%o (Python) # LBfactors() in A330882
%o from numba import njit
%o @njit() # comment out for n > 64
%o def a(n):
%o if n <= 1: return 2*n
%o LBfacsum = 0
%o for i in range(2**(n-1)): # only search 1st bit == 1 by symmetry
%o LBfacsum += LBfactors((1<<(n-1))|i, n)
%o return 2*LBfacsum # symmetry
%o print([a(n) for n in range(25)]) # _Michael S. Branicky_, Dec 31 2020
%Y Cf. A330881, A330882.
%K nonn
%O 0,2
%A _Jeffrey Shallit_, Apr 30 2020
%E a(28)-a(35) from _Bert Dobbelaere_, May 12 2020