cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213370 a(n) = n AND 2*n, where AND is the bitwise AND operator.

This page as a plain text file.
%I A213370 #54 May 17 2021 04:56:20
%S A213370 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,
%T A213370 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,
%U A213370 48,48,50,56,56,60,62,0,0,0,2,0,0,4,6,0,0,0,2,8,8
%N A213370 a(n) = n AND 2*n, where AND is the bitwise AND operator.
%H A213370 Antti Karttunen, <a href="/A213370/b213370.txt">Table of n, a(n) for n = 0..16384</a> (terms 0..1023 from T. D. Noe)
%H A213370 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A213370 a(n) = 2 * A048735(n).
%F A213370 a(n) = (1/2)*(A048727(n) XOR A269160(n)) = (n OR 2n) XOR (n XOR 2n). - _Antti Karttunen_, May 16 2021
%t A213370 Table[BitAnd[n, 2n], {n, 0, 63}] (* _Alonso del Arte_, Jun 19 2012 *)
%o A213370 (Python)
%o A213370 for n in range(99):
%o A213370     print(2*n & n, end=", ")
%o A213370 (PARI) a(n) = bitand(n, 2*n); \\ _Michel Marcus_, Mar 26 2021
%Y A213370 Cf. A080099, A213526, A048727, A048735, A269160.
%Y A213370 Cf. A003714: indices of 0's.
%Y A213370 Cf. A213540: indices of 2's, indices of 4's divided by 2.
%K A213370 nonn,base,easy
%O A213370 0,4
%A A213370 _Alex Ratushnyak_, Jun 14 2012