login
A213370
a(n) = n AND 2*n, where AND is the bitwise AND operator.
10
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,4
FORMULA
a(n) = 2 * A048735(n).
a(n) = (1/2)*(A048727(n) XOR A269160(n)) = (n OR 2n) XOR (n XOR 2n). - Antti Karttunen, May 16 2021
MATHEMATICA
Table[BitAnd[n, 2n], {n, 0, 63}] (* Alonso del Arte, Jun 19 2012 *)
PROG
(Python)
for n in range(99):
print(2*n & n, end=", ")
(PARI) a(n) = bitand(n, 2*n); \\ Michel Marcus, Mar 26 2021
CROSSREFS
Cf. A003714: indices of 0's.
Cf. A213540: indices of 2's, indices of 4's divided by 2.
Sequence in context: A257813 A278280 A351403 * A244138 A284611 A282551
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, Jun 14 2012
STATUS
approved