login
Number of subwords of length n in infinite word generated by a -> aab, b -> b.
(Formerly M1001)
7

%I M1001 #34 Jan 08 2019 09:12:41

%S 1,2,4,6,9,13,17,22,28,35,43,51,60,70,81,93,106,120,135,151,167,184,

%T 202,221,241,262,284,307,331,356,382,409,437,466,496,527,559,591,624,

%U 658,693,729,766,804,843,883,924,966,1009,1053,1098,1144,1191,1239

%N Number of subwords of length n in infinite word generated by a -> aab, b -> b.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Vincenzo Librandi, <a href="/A006697/b006697.txt">Table of n, a(n) for n = 0..1000</a>

%H J.-P. Allouche and J. Shallit, <a href="http://dx.doi.org/10.1016/0304-3975(92)90001-V">The ring of k-regular sequences</a>, Theoretical Computer Sci., 98 (1992), 163-197.

%H J.-P. Allouche, J. Shallit, <a href="http://arxiv.org/abs/1605.02361">On the subword complexity of the fixed point of a -> aab, b -> b, and generalizations</a>, arXiv preprint arXiv:1605.02361 [math.CO], 2016.

%F G.f.: 1 + 1/(1-x) + 1/(1-x)^2 * [1/(1-x) - sum(k>=1, x^(2^k+k-1))] (conjectured). - _Ralf Stephan_, Mar 05 2004

%F Conjectures: partial sums of A103354, also equal to A094913(n) + 1. - _Vladeta Jovovic_, Sep 19 2005

%F a(n) = sum(k=0,n,min(2^k,n-k+1)) = 2^(m+1)-1 + (n-m)(n-m+1)/2 with m = [ n+1-LambertW( 2^(n+1) * log(2) ) / log(2) ] = integer part of the solution to 2^m = n+1-m. (conjectured). - _M. F. Hasler_, Dec 14 2007

%t A103354[n_] := Floor[ FullSimplify[ ProductLog[ 2^n*Log[2]]/Log[2]]]; Accumulate[ Table[ A103354[n], {n, 1, 54}]] (* _Jean-François Alcover_, Dec 13 2011, after _M. F. Hasler_ *)

%o (PARI) LambertW(y) = solve( X=1,log(y), X*exp(X)-y) A006697(n,b=2)=local(m=floor(n+1-LambertW(b^(n+1)*log(b))/log(b)));(b^(m+1)-1)/(b-1)+(n-m)*(n-m+1)/2 \\ _M. F. Hasler_, Dec 14 2007

%Y Cf. A005943, A005942, A094913, A134457, A134466.

%K nonn,easy,nice

%O 0,2

%A _N. J. A. Sloane_, _Jeffrey Shallit_

%E More terms from _Michel ten Voorde_ Apr 11 2001