OFFSET
0,4
COMMENTS
The parity of this sequence is A228495(n+1).
Alternatively, the number of ways to write n = x+y, where x, y are evil numbers (members of A001969). - Jeffrey Shallit, Jun 22 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Tanya Khovanova, There are no coincidences, arXiv:1410.2193 [math.CO], 2014.
FORMULA
G.f.: (1/4)*(1/(1 - x) + Product_{k>=0} (1 - x^(2^k)))^2. - Ilya Gutkovskiy, Apr 03 2019
From Jeffrey Shallit, Jun 22 2021: (Start)
a(n) = v mu(x) w, where x is n expressed in base 2, and
v = [ 1, 0, 0, 0, 0, 0]
mu(0) = [[ 1, 0, 0, 0, 0, 0],
[ 0, 0, 1, 0, 0, 0],
[ 0, 0, 0, 0, 1, 0],
[-1, 2,-2, 1, 0, 1],
[-2, 2, 0, 0,-1, 2],
[-1, 2,-3, 0, 1, 2]]
mu(1) = [[ 0, 1, 0, 0, 0, 0],
[ 0, 0, 0, 1, 0, 0],
[ 0, 0, 0, 0, 0, 1],
[ 0, 1,-1,-2, 1, 2],
[-2, 2,-2, 2, 0, 1],
[-2, 3,-2,-1, 0, 3]]
w = [ 1, 0, 0, 2, 0, 2] (End)
MATHEMATICA
a59[n_]:= Mod[SeriesCoefficient[(1+Sqrt[(1-3x)/(1+x)])/(2(1+x)), {x, 0, n}], 2];
a[n_] := Sum[a59[k] a59[n-k], {k, 0, n}];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 15 2018 *)
Table[Sum[(1-ThueMorse[k])*(1-ThueMorse[n - k]), {k, 0, n}], {n, 0, 80}] (* G. C. Greubel, Apr 03 2019 *)
PROG
(PARI) nh(n)=!(hammingweight(n)%2);
a(n) = sum(k=0, n, nh(k)*nh(n-k)); \\ Michel Marcus, Sep 12 2014
(PARI) m0 = [1, 0, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0; 0, 0, 0, 0, 1, 0; -1, 2, -2, 1, 0, 1; -2, 2, 0, 0, -1, 2; -1, 2, -3, 0, 1, 2];
m1 = [0, 1, 0, 0, 0, 0; 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 0, 1; 0, 1, -1, -2, 1, 2; -2, 2, -2, 2, 0, 1; -2, 3, -2, -1, 0, 3];
a(n)=my(t=[1, 0, 0, 0, 0, 0]); forstep(i=exponent(n), 0, -1, t*=if(bittest(n, i), m1, m0)); t*[1, 0, 0, 2, 0, 2]~; \\ Following Shallit; for more efficiency, calculate by bytes instead of bits. Charles R Greathouse IV, Jun 23 2021
(Haskell)
a247303 n = a247303_list !! n
a247303_list = f [head a010059_list] $ tail a010059_list where
f xs (z:zs) = (sum $ zipWith (*) xs (reverse xs)) : f (z : xs) zs
-- Reinhard Zumkeller, Sep 14 2014
(Sage) [sum((1-sloane.A010060(k))*(1-sloane.A010060(n-k)) for k in (0..n)) for n in (0..80)] # G. C. Greubel, Apr 03 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tanya Khovanova, Sep 11 2014
EXTENSIONS
More terms from Michel Marcus, Sep 12 2014
STATUS
approved