login
A283978
a(2n) = 0, a(2n+1) = A002487(n) AND A002487(n+1), where AND is bitwise-and (A004198).
4
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, 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, 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
OFFSET
0,12
FORMULA
a(2n) = 0, a(2n+1) = A002487(n) AND A002487(n+1), where AND is bitwise-and (A004198).
a(n) = A283976(n) - A283977(n).
a(n) = A002487(n) - A283976(n) = (A002487(n) - A283977(n))/2.
MATHEMATICA
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 *)
PROG
(Scheme) (define (A283978 n) (if (even? n) 0 (A004198bi (A002487 (/ (- n 1) 2)) (A002487 (/ (+ n 1) 2))))) ;; Where A004198bi implements bitwise-AND (A004198).
(PARI) A(n) = if(n<2, n, if(n%2, A(n\2) + A((n + 1)/2), A(n/2)));
a(n) = if(n<2, 0, if(n%2, bitand(A(n\2), A((n + 1)/2)), 0));
for(n=0, 120, print1(a(n), ", ")) \\ Indranil Ghosh, Mar 23 2017
CROSSREFS
Bisections: A000004, A283988.
Sequence in context: A071957 A329186 A298609 * A002655 A064891 A278500
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Mar 21 2017
STATUS
approved