%I
%S 0,1,1,3,3,8,8,17,23,41,55,102,144,247,387,631,987,1636,2584,4233,
%T 6787,11011,17711,28794,46380,75181,121441,196685,317811,514712,
%U 832040,1346921,2178429,3525581,5702937,9229314,14930352,24160419
%N Total number of white pearls remaining in the chest  see Comments.
%C Define a(1) = 0. To calculate a(n):
%C 1. Expand (A + B)^n into 2^n words of length n consisting of letters A and B (i.e., use of the distributive and associative laws of multiplication but assume A and B do not commute).
%C 2. To each of the 2^n words, associate a free binary necklace consisting of n "black and white pearls". Figuratively, all 2^n necklaces can be placed inside a treasure chest.
%C 3. Remove all npearled necklaces which are found to have (at least) two adjacent white pearls from the chest.
%C 4. If two necklaces are found to be equivalent, remove one of them from the chest. Continue until no two equivalent necklaces can be found in the chest.
%C 5. Counting the total number of white pearls left in the chest gives a(n).
%D C. Dement, Floretiongenerated Integer Sequences (work in progress).
%H Max Alekseyev, <a href="/A113166/b113166.txt">Table of n, a(n) for n = 1..50</a>
%H C. Dement and Max Alekseyev, <a href="/A113166/a113166.txt">Notes on A113166</a>
%F a(n) = sum_{k=1...[n/2]} k/(nk) sum_{j=1...gcd(n,k)} { (nk)*gcd(n,k,j)/gcd(n,k) choose k*gcd(n,k,j)/gcd(n,k) } (Alekseyev).
%F a(p) = Fib(p1) for all primes, where Fib = A000045 (_Creighton Dement_ and _Antti Karttunen_, proved by _Max Alekseyev_).
%o (PARI) A113166(n) = sum(k=1,n\2, k/(nk) * sum(j=1,gcd(n,k), binomial((nk)*gcd([n,k,j])/gcd(n,k),k*gcd([n,k,j])/gcd(n,k)) ))
%Y Cf. A034748, A006206, A000358, A000045, A000204.
%K nonn
%O 1,4
%A _Creighton Dement_, Jan 05 2006; Jan 08 2006; Jul 29 2006
%E More terms from _Max Alekseyev_, Jun 20 2006
