%I #27 Apr 07 2020 11:04:02
%S 0,1,5,14,38,83,191,401,849,1740,3600,7285,14845,29938,60486,121686,
%T 245046,492090,988782,1983945,3981105,7982802,16006686,32080696,
%U 64292920,128812795,258059003,516891668,1035249788,2073167531
%N a(n) = 2^m minus (the total number of distinct subsets of length-(m-n) binary words that can appear as the factor of a word of length m, for 0 <= n < m/2).
%H Shuo Tan and Jeffrey Shallit, <a href="http://arxiv.org/abs/1304.3666">Sets represented as the length-n factors of a word</a>, preprint, arXiv:1304.3666 [cs.FL], 2013.
%F a(n) = Sum_{i=1..n+1} (i-1)*L(i), where L(i) is the number of Lyndon words of length i (sequence A001037).
%e a(2) = 5, because (for example) there are 2^5 - 5 = 27 distinct subsets of length 3 words arising as the subwords of a binary word of length 5.
%t a27375[i_] := Sum[MoebiusMu[i/d]*2^d, {d, Divisors[i]}];
%t a[n_] := Sum[a27375[i+1] i/(i+1), {i, 1, n}];
%t Table[a[n], {n, 0, 29}] (* _Jean-François Alcover_, Jul 14 2018, after _Peter Luschny_ *)
%o (Sage)
%o def A027375(i): return sum(moebius(i//d)*2^d for d in divisors(i))
%o def A225865(n):
%o return sum(A027375(i+1)*i/(i+1) for i in (1..n))
%o [A225865(n) for n in (0..30)] # _Peter Luschny_, May 18 2013
%Y Cf. A001037.
%K nonn
%O 0,3
%A _Jeffrey Shallit_, May 18 2013
|