|
|
A108804
|
|
Self-convolution of A010060 (Thue-Morse sequence).
|
|
3
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1/4)*(1/(1 - x) - Product_{k>=0} (1 - x^(2^k)))^2. - Ilya Gutkovskiy, Apr 03 2019
|
|
MATHEMATICA
|
Table[Sum[ThueMorse[k]*ThueMorse[n-k], {k, 0, n}], {n, 0, 85}] (* G. C. Greubel, Apr 03 2019 *)
|
|
PROG
|
(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 */
(PARI) {a(n)=sum(k=0, n, (hammingweight(k)*hammingweight(n-k))%2)};
(Haskell)
a108804 n = a108804_list !! n
a108804_list = f [head a010060_list] $ tail a010060_list where
f xs (z:zs) = (sum $ zipWith (*) xs (reverse xs)) : f (z : xs) zs
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|