login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A283978 a(2n) = 0, a(2n+1) = A002487(n) AND A002487(n+1), where AND is bitwise-and (A004198). 4

%I #11 Mar 23 2017 11:44:10

%S 0,0,0,1,0,0,0,0,0,1,0,2,0,2,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,

%T 0,4,0,4,0,3,0,0,0,0,0,5,0,2,0,2,0,5,0,0,0,0,0,3,0,4,0,4,0,1,0,0,0,4,

%U 0,1,0,0,0,0,0,3,0,2,0,2,0,3,0,8,0,8,0,5,0,4,0,4,0,1,0,0,0,0,0,1,0,4,0,4,0,5,0,8,0,8,0,3,0,2,0,2,0,3,0,0,0

%N a(2n) = 0, a(2n+1) = A002487(n) AND A002487(n+1), where AND is bitwise-and (A004198).

%H Antti Karttunen, <a href="/A283978/b283978.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) = 0, a(2n+1) = A002487(n) AND A002487(n+1), where AND is bitwise-and (A004198).

%F a(n) = A283976(n) - A283977(n).

%F a(n) = A002487(n) - A283976(n) = (A002487(n) - A283977(n))/2.

%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, 0, BitAnd[a[#], a[# + 1]] &[(n - 1)/2]], {n, 0, 120}] (* _Michael De Vlieger_, Mar 22 2017 *)

%o (Scheme) (define (A283978 n) (if (even? n) 0 (A004198bi (A002487 (/ (- n 1) 2)) (A002487 (/ (+ n 1) 2))))) ;; Where A004198bi implements bitwise-AND (A004198).

%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, 0, if(n%2, bitand(A(n\2), A((n + 1)/2)), 0));

%o for(n=0, 120, print1(a(n), ", ")) \\ _Indranil Ghosh_, Mar 23 2017

%Y Bisections: A000004, A283988.

%Y Cf. A002487, A004198, A283976, A283977.

%K nonn,base

%O 0,12

%A _Antti Karttunen_, Mar 21 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 16:17 EDT 2024. Contains 374612 sequences. (Running on oeis4.)