%I #18 Apr 04 2019 17:28:42
%S 0,0,1,2,1,2,2,0,3,4,2,2,4,2,3,8,3,4,6,2,6,6,5,8,6,4,7,10,5,10,10,0,
%T 11,12,6,10,10,6,9,16,8,8,13,10,11,14,12,8,14,12,11,18,11,14,16,8,15,
%U 20,14,10,20,10,11,32,11,12,22,10,18,22,17,16,20,16,17,26,15,22,24,8,24,24,17
%N Self-convolution of A010060 (Thue-Morse sequence).
%H Reinhard Zumkeller, <a href="/A108804/b108804.txt">Table of n, a(n) for n = 0..10000</a>
%F a(2n+1) = (1/2) * (A115384(n) - 2a(n)). - _Ralf Stephan_, Aug 23 2013
%F G.f.: (1/4)*(1/(1 - x) - Product_{k>=0} (1 - x^(2^k)))^2. - _Ilya Gutkovskiy_, Apr 03 2019
%F a(n) = Sum_{k=0..n} A010060(k)*A010060(n-k), for n>=0. - _G. C. Greubel_, Apr 03 2019
%t Table[Sum[ThueMorse[k]*ThueMorse[n-k], {k, 0, n}], {n, 0, 85}] (* _G. C. Greubel_, Apr 03 2019 *)
%o (PARI) a(n)=sum(k=0,n,(subst(Pol(binary(k)),x,1)%2)*(subst(Pol(binary(n-k)),x,1)%2)) /* _Ralf Stephan_, Aug 23 2013 */
%o (PARI) {a(n)=sum(k=0,n, (hammingweight(k)*hammingweight(n-k))%2)};
%o vector(85, n, n--; a(n)) \\ _G. C. Greubel_, Apr 03 2019
%o (Haskell)
%o a108804 n = a108804_list !! n
%o a108804_list = f [head a010060_list] $ tail a010060_list where
%o f xs (z:zs) = (sum $ zipWith (*) xs (reverse xs)) : f (z : xs) zs
%o -- _Reinhard Zumkeller_, Sep 14 2014
%o (Sage) [sum(sloane.A010060(k)*sloane.A010060(n-k) for k in (0..n)) for n in (0..85)] # _G. C. Greubel_, Apr 03 2019
%Y Cf. A010060, A108805.
%Y Cf. A247303.
%K nonn
%O 0,4
%A _N. J. A. Sloane_, Jul 09 2005
|