A213370 a(n) = n AND 2*n, where AND is the bitwise AND operator.
0, 0, 0, 2, 0, 0, 4, 6, 0, 0, 0, 2, 8, 8, 12, 14, 0, 0, 0, 2, 0, 0, 4, 6, 16, 16, 16, 18, 24, 24, 28, 30, 0, 0, 0, 2, 0, 0, 4, 6, 0, 0, 0, 2, 8, 8, 12, 14, 32, 32, 32, 34, 32, 32, 36, 38, 48, 48, 48, 50, 56, 56, 60, 62, 0, 0, 0, 2, 0, 0, 4, 6, 0, 0, 0, 2, 8, 8
Offset: 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..16384 (terms 0..1023 from T. D. Noe)
- Index entries for sequences related to binary expansion of n
Crossrefs
Programs
-
Mathematica
Table[BitAnd[n, 2n], {n, 0, 63}] (* Alonso del Arte, Jun 19 2012 *)
-
PARI
a(n) = bitand(n, 2*n); \\ Michel Marcus, Mar 26 2021
-
Python
for n in range(99): print(2*n & n, end=", ")
Formula
a(n) = 2 * A048735(n).
Comments