Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Sep 19 2023 15:32:36
%S 2,0,0,4,0,-4,0,8,1,-12,0,-4,0,12,6,16,0,-30,0,-12,-6,28,0,-8,9,20,15,
%T 12,0,-32,0,32,-14,-60,-18,-28,0,60,-10,-24,0,64,0,28,61,-52,0,-16,9,
%U 18,30,20,0,-66,-42,24,-30,-44,0,-20,0,44,-77,64,-30,-96,0,-60,26,160,0,-56,0,116,39,60,42,-96,0,-48,89
%N Sum of reversing binary value of n (A065620) and its Dirichlet inverse.
%H Antti Karttunen, <a href="/A365714/b365714.txt">Table of n, a(n) for n = 1..16384</a>
%F a(n) = A065620(n) + A365713(n).
%F a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1<d<n} A065620(d) * A365713(n/d).
%F a(4*n)/4 = A065620(n).
%o (PARI)
%o A065620(n, c=1) = sum(i=0, logint(n+!n, 2), if(bittest(n, i), (-1)^c++<<i)); \\ From A065620 by _M. F. Hasler_
%o memoA365713 = Map();
%o A365713(n) = if(1==n,1,my(v); if(mapisdefined(memoA365713,n,&v), v, v = -sumdiv(n,d,if(d<n,A065620(n/d)*A365713(d),0)); mapput(memoA365713,n,v); (v)));
%o A365714(n) = (A065620(n)+A365713(n));
%Y Cf. A065620, A365713.
%Y Cf. also A365712.
%K sign
%O 1,1
%A _Antti Karttunen_, Sep 19 2023