%I #12 Mar 23 2017 11:43:57
%S 0,1,1,1,1,3,2,3,1,3,3,3,2,3,3,3,1,5,4,7,3,7,5,7,2,7,5,7,3,7,4,5,1,5,
%T 5,5,4,7,7,7,3,11,8,13,5,7,7,7,2,7,7,7,5,13,8,11,3,7,7,7,4,5,5,5,1,7,
%U 6,7,5,13,9,13,4,15,11,15,7,15,10,11,3,11,11,11,8,13,13,13,5,13,12,15,7,15,9,11,2,11,9,15,7,15,12,13,5,13,13,13,8
%N a(2n) = A002487(n), a(2n+1) = A002487(n) OR A002487(n+1), where OR is bitwise-or (A003986).
%H Antti Karttunen, <a href="/A283976/b283976.txt">Table of n, a(n) for n = 0..8192</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F a(2n) = A002487(2n) = A002487(n), a(2n+1) = A002487(n) OR A002487(n+1), where OR is bitwise-or (A003986).
%F a(n) = A283977(n) + A283978(n).
%F a(n) = A002487(n) - A283978(n).
%t a[0] = 0; a[1] = 1; a[n_] := If[EvenQ@ n, a[n/2], a[(n - 1)/2] + a[(n + 1)/2]]; Table[If[EvenQ@ n, a[n/2], BitOr[a[#], a[# + 1]] &[(n - 1)/2]], {n, 0, 108}] (* _Michael De Vlieger_, Mar 22 2017 *)
%o (Scheme) (define (A283976 n) (if (even? n) (A002487 n) (A003986bi (A002487 (/ (- n 1) 2)) (A002487 (/ (+ n 1) 2))))) ;; Where A003986bi implements bitwise-OR (A003986).
%o (PARI) A(n) = if(n<2, n, if(n%2, A(n\2) + A((n + 1)/2), A(n/2)));
%o a(n) = if(n<2, n, if(n%2, bitor(A(n\2), A((n + 1)/2)), A(n\2)));
%o for(n=0, 101, print1(a(n),", ")) \\ _Indranil Ghosh_, Mar 23 2017
%Y Bisections: A002487, A283986.
%Y Cf. A002487, A003986, A283977, A283978.
%K nonn,base
%O 0,6
%A _Antti Karttunen_, Mar 21 2017